Polymorphism

Well, I'll be adding more to this section soon.

For the time being I just wanted to tell a little about what Polymorphism is?
Poly means many. Polymorphism basically means many forms. As a simple example : there are many English words which have a different meaning depending on the context of use. Basically, the word is the same word but it's interpretation varies depending on the use.
Similarly, in C++ we can make use of polymorphism. For example : consider operator overloading. You may have created an overloaded + operator to concatenate two strings. Now, the + sign can be used to add two strings (because you overloaded it) and it can even be used to add two numbers (which was it's actual use). Depending on the type of data being operated on, the compiler will decide on which function to use. If the operands are numbers, then it will use the normal function. 
This is a type of polymorphism.

go to the next section on : Virtual Functions

or go back to the Contents Page 2