1. if the function has been declared as inline (inline), the function body may be expanded when it is called during compilation. If it is not declared as inline, then the function is called at runtime.
2. Although value-based transmission is satisfied with the built-in data type objects and small class objects, it is too inefficient for large class objects. You can use the reference Parameter Function to access the class object specified as the real parameter without copying it in the activity record of the function.
3. If a parameter may point to different objects in the function, or this parameter may not point to any object, you must use the pointer parameter.
An important usage of referenced parameters is that it allows us to effectively implement the overload operator while ensuring the directness of usage.
4. Sometimes we cannot list the types and numbers of all real parameters passed to the function. In this case, we can use the ellipsis (...) to specify the function parameter table.
5. The possibility of passing a parameter error to a function increases with the length of the parameter table. As a general rule, 8 parameters should be the maximum value. To replace a large parameter, a table programmer can declare the parameter as a class, array, or a container type www.2cto.com.
6. the inline function must be visible to the compiler so that it can expand the function inline at the call point. Unlike non-inline functions, inline functions must be defined in each text file that calls the function. Of course, for different files of the same program, if the inline function appears, its definition must be the same. Therefore, we recommend that you put the definition of the inline function in the header file and include the header file in each file that calls the inline function.
7. int main (int argc, char * argv []) {...}: argc contains the number of command line options. argv contains aygc C-style strings, representing Command Options separated by spaces. Argv [0] is always set to the Command currently being called, from Index 1 to argc-1 representing the actual option that is passed to the command.
8. for pointers to functions, initialization and assignment are correct only when the parameter table and return type of the Left pointer of the value assignment operator exactly match the parameter table and return type of the Right function or pointer; if they do not match, a compilation error message is generated. There is no implicit type conversion between pointers pointing to function types.
9. the pointer to the C function is different from the pointer type to the C ++ function. Therefore, a pointer to a C function cannot be initialized or assigned a value using a pointer to a C ++ function. Otherwise, a compilation error occurs.