1. Compared to the C function, C + + adds overloads, inline, const (for member functions only), and virtual (member function only) mechanisms.
2. Overloaded functions can be distinguished only by argument lists and not by return values.
3. Global functions and class member functions have the same name and cannot be overloaded with different scopes.
4. member function overloading conditions:
(1) Have the same scope (in the same class).
(2) The function has the same name.
(3) different parameter types, order, or number (including const and non-const parameters).
(4) The virtual keyword is optional.
5. The member function overrides the condition:
(1) There are different scopes (in base classes and derived classes).
(2) The function has the same name.
(3) The parameter list is the same.
(4) A base class function is a virtual function.
6. The member function hides the condition:
(1) The derived class and the base class have the same name, but the argument list is not the same, regardless of whether the base class has the virtual keyword, the function of the base class is hidden in the derived class.
(2) The derived class and the base class have the same name, the parameter list is the same, the base class has no virtual keyword, and the function of the base class is hidden in the derived class.
7. Remove the member function from the hide, use the Using keyword, such as using Base::functon;
C++/C Function Properties