Function overloading means that different operations are distinguished by different parameters.
Function overload only requires different parameters. The compiler splits function names, ranges, and parameters to generate internal names for the linker.
The significance of default parameters lies in: 1. Simplifying the setting of fixed parameter values to facilitate function calls; 2. Making it easier to modify function definitions in the future.
The default value is defined when the parameter is declared. The default value cannot be written when the parameter is defined, which is the same as that of a normal function. Example: void fun (INT Param, Int = 0, float = 1.1)
The default parameter cannot be used as a flag to determine which function to execute. This is the basic principle. In this case, as long as the function can be used, the function should be decomposed into two or more overloaded functions.
◆ The default parameter does not have an identifier for the declared parameter. This syntax allows you to use a parameter as a placeholder instead of using it. The purpose is that we can modify the function definition in the future without modifying the function call.
◆ An important application of the default parameter is that the new parameter can use the default parameter to ensure that allCodeNo trouble.