May 2012
Intermediate to advanced
679 pages
16h 56m
English
One of the useful features of object-oriented programming is polymorphism. It is the ability of the objects to take different forms. The ability to display variable behaviour depending on the situation is a great facility in any programming language. In C++, polymorphism appears in three entities.
In an earlier chapter, we have seen operator overloading. Here, one operator say plus sign produces different actions in case of integers, complex numbers or strings. This is a type of polymorphism.
We have also seen function overloading. Two functions having same names will have different actions depending on the nature of parameters passed. This is also a type of polymorphism.
Now, we will study polymorphism ...
Read now
Unlock full access