Call Mechanism


  • Whenever a program has a C++ virtual function declared, a v-table is constructed for the class.
  • The v-table consists of addresses to the virtual functions for classes and pointers to the functions from each of the objects of the derived class.
  • Whenever there is a function call made to the C++ virtual function, the v-table is used to resolve to the function address.
  • This is how the Dynamic binding happens during a virtual function call.


Polymorphism << Previous

Next >> Pure Virtual Functions

Our aim is to provide information to the knowledge seekers. 


comments powered by Disqus




Footer1