Click here to Skip to main content
15,886,258 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
The function overroding is certainly polymorphism. I wonder if function overloading is polymorphism too. I mean in function overloading we write multiple function with same name each with it's own functioning. The polymorphism have the similar concept. Please help me clearify.
Posted

hi,
Good explanation provided here[^].

hope it helps !!
 
Share this answer
 
No, these are separate concepts. In polymorphism one class of objects may be diversified by deriving subclasses that share part of the behavior of their base class and change or add some other behavior. That creates a tree-like hierarchy of classes.

In contrast, function overloading just uses the same function name for multiple functions with different argument sets. There is no inheritance involved and hence the set of functions with same name does not form a hierarchy.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900