Jump to content

C++ Polymorphism explanation questionable

Recommended Posts


I've been teaching C++ and OO for 20 years and stumbled over this:


Where is the polymorphism?

My second line is a polymorphic call.

Animal *pAnimal = new Pig();


IMO your code is misleading and not useful.

Please contact me to discuss.


Link to post
Share on other sites

I'm not certain how frequently the staff visits the forum, but I'd say less than once a year. If you find an error on any page you can click the "REPORT ERROR" button at the bottom of that page to send a notice to the site owners.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...