Default parameters:
1: In the parameter list, only the parameters at the back of the list can be defaulted. That is to say, a non-default parameter cannot be followed by a default parameter;
2: Once a default parameter is used in a function call, all parameters following this parameter must be default;
3: default parameters can only be placed in the function declaration, usually in a header file. The compiler must know the default value before using this function. For the convenience of reading, you can put some default comment values in the function definition.
Void FN (INT x/* = 0 */){}
Placeholder parameters:
Placeholder parameters can be used in function declaration as follows:
Void F (int x, Int = 0, float = 1.1 );
The purpose is to modify the function definition in the future without modifying all function calls. Of course, a parameter with a name can achieve the same purpose, however, if the defined parameter is not used in the function body, most compilers will give a warning message;