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: 518

Filed under:
|
|

In C++, there are 2 types of Polymorphism:

  1. Object Polymorphism
  2. 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

Related posts about c++

Related posts about oop