C ++ - function overloading

  • C ++ allows multiple functions with the same name, as long as they can be different parameter list, which is overloaded function
  • Reload function can make a variety of uses
  • Parameter Type list, the number of parameters, parameter order, as long as there is a list of the different parameters of different called
  • Function overloading is just the syntax level, in essence, they are still different functions, occupy different memory, different entry address
  • Too few parameters or function overloading ambiguity problem may occur when too much, and that is the compiler does not know which function prototype match

Guess you like

Origin www.cnblogs.com/cxc1357/p/11908387.html