In this tutorial, I will explain the basic concepts of polymorphism of OOP (Object Oriented Programming). I will make this tutorial as easy as possible so that it would be easy to understand to everyone.
The word Polymorphism is a Greek word from polys means “many, much” and morphē means of many forms. Polymorphism is the 3rd pillar of OOP (Object Oriented Programming). Object oriented programming is incomplete without having the polymorphism. In the other words, “many forms of a single object is called Polymorphism”.
There are two types of polymorphism:
In C++ programming language, you can write the c++ programs by compile time polymorphism in two way which is described below in details.
In C++ programming language, you can achieve the Runtime polymorphism with the help of virtual function.
If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.
Article Tags: c++ function overloading, C++ Tutorial, example of function overloading in c++, polymorphisam, polymorphism, polymorphism in c++, polymorphism in oops, polymorphism in oops concept, write a program using polymorphism