A function overloaded
C ++ allows the function of the same name in the same action statement of several functionally similar domain, which shape function parameter list of the same name (the number or type or order parameter) must be different.
The principle function overloading
the function name, the domain and the list of parameters, the three must be identical, will conflict.
Second, the name mangling
in C language, the name mangling is _ the function name, so long as the same function name, it will lead to conflict
in the C ++ language:? The domain name of the function @ 1 @ 2 @ @ domain format constitute the argument list @Z
int func(int) | ? Func @@ yahh @ Z |
---|---|
int C::func(int) | ?func@C@@AAEHH@Z |
int C::C2::func(int) | ?func@C2@c@@AAEHH@Z |