Polymorphism is the ability
to use an operator or method in different
ways. Polymorphism gives different meanings
or functions to the operators or methods
Modern object-oriented languages provide 3
things:
encapsulation
inheritance
polymorphism
C++ provides three different types of
polymorphism.
■Virtual functions
■Function name overloading
■Operator overloading
In addition to the above three types of
polymorphism, there exist other kinds of
polymorphism:
■run-time
■compile-time
■ad-hoc polymorphism
■parametric polymorphism
|