Body
Polymorphism
In this part you will learn:
1. What is polymorphism
2. Why need polymorphism
3. What is virtual function
4. What is pure virtual function
5. Program
6. Output
Polymorphism
Polymorphism means having many forms. In c++, when we are dealing with classes and their inheritance, there occurs a case when we have more than one derived classes of the base class. Using polymorphism we can call a member function, which will, depending upon the type of object that invokes the function, cause a different function to perform.
Polymorphism makes the program simple. Instead of
Add new comment