Static polymorphism is the process of determining which functions, such as overloading of functions, will be executed here during system compilation.
Dynamic polymorphism is the use of virtual functions to achieve the runtime polymorphism, that is, when the system compiles do not know which function the program is going to call, only when running here to determine which function to jump next to the stack frame.
The virtual function is the declaration in the base class that the function is virtual (before the function is added to the dummy keyword), and then formally defined in the subclass (the function name, return value, function parameter number, parameter type of the class in the subclass, all the same as the virtual function declared by the base class. Otherwise, it is overloaded with the function, then define a pointer to the base class object, then point the pointer to the subclass object derived from the base class, and then use the pointer to invoke the virtual function to implement the dynamic polymorphism.
Function name in the same case:
Overloads (scopes are the same, the number of parameters or the order or type are different, whether or not virtual functions). are essentially different functions.
Overrides, or overrides, differ in scope, with the same number of arguments, which must be a virtual function. The essence is to replace the function address of the virtual function table at the time of inheritance.
Hidden (scopes differ, regardless of whether the parameters are the same, whether or not virtual functions). Occurs when a child scope is entered from the parent scope.
conclusion, the same scope must be overloaded otherwise redefined, the scope is different if the parameter is the same and the virtual function is overwritten otherwise is hidden.
For overloads:
Const type and type do not constitute overloads
Const type& and type& form overloads
Const type* and type* form overloads
A/C + + static polymorphism and dynamic polymorphism