polymorphism and abstract classes
I could not understand why to use a pure virtual function to make the class an abstract class insted of using only a virtual function.Or even why to use a virtual function and define a pointer to base class that points the derived class we could use a pointer of type derived class itself instead they say that is called polymorphism.Can someone please tell me advantages of using them by giving some practical examples.Thank you.
|