The Base class must contain a function which is declared virtual. 
All other classes should be derived from the base class. 

VTABLE
VPTR

"An object containing virtual functions holds as its first data member a hidden field, pointing to an array of pointers holding the addresses of the virtual functions."

"Each Class has a VTABLE that stores the functions that it can access and each class contains a VPTR that can access the VTABLE."

"The table of addresses of virtual functions is shared by all objects of the class."

"If a Virtual Function is called within a derived classes constructor or destructor then the derived function is always called."

