Polymorphism in C++
The word polymorphism means having many forms. In simple words, we can define
polymorphism as the ability of a message to be displayed in more than one form. Polymorphism is considered as one of the important
features of Object Oriented Programming.
In C++ polymorphism is mainly divided into two types:
·
Compile time Polymorphism
·
Runtime Polymorphism
1.
Compile time
polymorphism:
This type of polymorphism is achieved by function overloading
or operator overloading.
2.
Runtime polymorphism: This type of polymorphism is achieved by Function
Overriding.
No comments:
Post a Comment