The memory in the derived class is not where the compiler is expecting it, at least for one base class. Code reuse is a good idea. It allows new code to implement functionality by calling old code. Polymorphism allows old code to implement functionality by calling new code. Read that again.
Polymorphism allows old code to implement functionality by calling new code.
This clumsy kind of polymorphism is the primary reason for pointers to functions. If the base-class function is virtual , then during runtime, the computer checks to see what object is pointed to, and calls the member function for that object's class . Virtual functions allow you to redefine functions in a derived class that are defined in a base class, and have those functions called on an object of the derived class even through a pointer to the base class. See example above. This is called static binding .