C ++ function overload mechanism query

xiaoxiao2021-03-06  16

I just started learning C for two months, I used to C foundation, and later learned VB, and web programming. Now start learning C , wanting C as its new breakthrough point.

Recently, it is not understood to the function overload mechanism of C . Ask everyone's help.

The problem is specifically described as follows:

More generally C support is called function to overload function overloading mechanism function overload allows two or more functions to limit the same name limit condition is that their parameter tables must be different or different from different parameters. The parameter table compiler can determine which version of the overload function that should be selected for a particular call should be a set of legal min () overload functions These functions can also be a class member function // group of min () The overload function // Each function has a unique parameter table #include ; int min (const, int); int min (const char * STR); Char min (string); String min (string, string); The overload function is exactly the same as the non-overload function of the running time is the time required to determine the call to the call when the compile time is used. If C No function overload support, then we must provide a unique name for each function in the program.

The type of parameter and number of functions in C before C is determined in advance, why can it be based on parameters in C

Type and number of differentiated parameters?

Thank you for your help. I urgently want to exchange learning with C programmers.

Pytruth1002@163.com

QQ: 16773707

转载请注明原文地址:https://www.9cbs.com/read-44862.html

New Post(0)