Jump to content

Recommended Posts

Posted

Hi,

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

https://www.w3schools.com/cpp/cpp_polymorphism.asp

Where is the polymorphism?

My second line is a polymorphic call.

Animal *pAnimal = new Pig();

pAnimal->animalSound();

IMO your code is misleading and not useful.

Please contact me to discuss.

John

Posted

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.

Posted
8 hours ago, Ingolme said:

I'm not certain how frequently the staff visits the forum, but I'd say less than once a year.

So that would be never! Or if they have their own mini me devs possibly they would call that a half.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...