Base classes all of the derived classes that re-want it to each define a version that is appropriate for itself, at which point the base class declares these as virtual functions.
Derived classes must declare all redefined virtual functions within them, and derived classes can add virtual before such functions, but they do not have to.
When a virtual function is called through a pointer or reference, the compiler produces code that knows the runtime to determine which version of the function should be called. The called function is the one that matches the dynamic type of the object that is bound to the pointer or reference.
The call is resolved at run time only if the virtual function is called with a pointer or reference.
In the new C++11 standard we can use the Override keyword to illustrate virtual functions in derived classes. The advantage of doing this is to make the programmer's intentions clearer while the compiler can find some errors for us.
Virtual inheritance is a unique concept in multiple inheritance See Programmer interview Treasure P144
Virtual functions and virtual inheritance