Is Polymorphism and Method Overloading is almost the same thing in C++
Posted
by
Maxood
on Stack Overflow
See other posts from Stack Overflow
or by Maxood
Published on 2012-09-22T21:35:56Z
Indexed on
2012/09/22
21:37 UTC
Read the original article
Hit count: 524
In C++, there are 2 types of Polymorphism:
- Object Polymorphism
- Function Polymorphism
Function polymorphism is exactly the same thing as method or function overloading i.e. We use the same method names with different parameters and return types. Now the question is why do we have this fancy name Polymorphism in OOP?
What distinctly distinguishes polymorphism from method overloading? Can someone explain with a scenario. Thanks
© Stack Overflow or respective owner