#What is the basis for judging overloaded methods in c?
1. The number of function parameters;
(Recommended tutorial: c language tutorial)
2. The type of function parameters;
3. The order of formal parameters;
4. Constant function const can also be used as the basis for judging function overloading.
Reason: When overloading the [] operator, the difference between whether there is const is: if there is const, it can only be read, but if there is no const, it can be read and written.
Note: The return value cannot be used as a condition for function overloading. The reason is that the compiler will not determine the return type of the function during compilation. The compiler will verify the return type only after the function is called, so the return value cannot be used as the basis for function overloading.
The above is the detailed content of What is the basis for judging overloaded methods in C++. For more information, please follow other related articles on the PHP Chinese website!