Joke Collection Website - Bulletin headlines - What does the asterisk in the function mean?
What does the asterisk in the function mean?
In addition to pointers, asterisks can also be used to define the return type of functions. For example, if a function returns a pointer to an integer, you can add an asterisk before the function name, such as int* functionName (). This method can also realize the function of manipulating pointer variables inside the function.
In the function parameter list, an asterisk can be used to indicate that the parameter is a pointer type. For example, int* arr means that arr is a pointer variable that points to an integer type. If you want to change the value pointed by the pointer in the function, you need to use the address of the pointer when calling the function, that is&; Arr. This method can avoid copying the way variables pass parameters in functions, thus improving the efficiency of the program.
- Related articles
- Community Seniors Fun Games Activity Plan
- Reflections on visiting the Science and Technology Museum
- What does fear of god mean?
- The spring outing was just then, and the breeze was ten miles-I only saw you, Tuyue.
- Classical Chinese describing urban prosperity
- Methods of raising and flying homing pigeons
- When one party is in trouble, many parties support it! Linyi kind people donated dozens of tons of vegetables to Shijiazhuang. What kind of virtue did they embody?
- How many languages ??will the Winter Olympics opening ceremony be translated into?
- Changing customs and breaking old stereotypes, culturally benefiting people and establishing new trends in society
- Slogans about marriage