What is member functions overriding?
Function overriding means to have the two or more functions with same name and with same signatures. Same signature means that to have the same name, same number of parameters and same data types.
Give example of member functions overriding?
Suppose Class A and class B have two functions with same name and same parameters . Then we can say that the function in class B overrides the function in class A.
using namespace std;
cout<<“print function for class A”<<endl;
class B : public A
cout<<“print function for class B”<<endl;
object.A :: print();
Here we have two functions of print() with same name and with same parameters…This is actually the function overriding.