The Analysis of the Virtual Function in C++ Programming
Feng Zhang · Journal of Hunan Industry Polytechnic · 2008
In C++ programming,polymorphism can be achieved at run time using virtual function by calling function of the derived class.Virtual function must be declared by a base class labeling virtual,it implemented polymorphism by pointer or reference.In a base class,abstract class is defined by declaring pure virtual function,a derived class must define all inherited pure virtual functions of its base classes to be concrete.At compile-time,VTABLE decides which version of virtual function to run by calling object in order to implement polymorphism.