|
-
October 15th, 2011, 12:23 PM
#10
Re: difference between polymorphism and overloading
 Originally Posted by GCDEF
That's not polymorphism. Polymorphism means that the correct function will be called based on the object type. Arguments in the based and derived classes have to be the same and the function has to be declared virtual in the base class.
Overloading is when you have functions with the same name but different types.
Overloading is polymorphism: ad-hoc polymorphism; what you stated is supertype/subtype polymorphism.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|