1 the subclass and parent return value parameters are the same, the function name is the same, and the virtual keyword is the type of the object that determines which function is called.
2 Subclass and Parent class as long as the function name is the same, there is no virtual keyword, the object of the subclass has no way to call a function with the same name as the parent class , the parent class has a function with the same name hidden, or a function with the same name can be forced to call the parent class Class::funtion_name .
3 Subclass and Parent parameters are different, the function name is the same, there is the virtual keyword, there is no polymorphism , the object of the subclass has no way to call the parent class with the same name function , The parent class has the same name function is hidden, You can also force calls to the parent class with the same name function class::funtion_name.
4 Subclass and Parent class return value is different, parameter is same, function name is same, there is virtual keyword, error C2555 compiler does not allow function name parameter same return value different function overload.
Names of C + + subclasses and parent class member functions