Possible Duplicate:
why do I need virtual table?
What is vtAble in C++?
Got to know vtable is a virtual table which has an array of pointers to virtual functions. Is there an article with practical implementation? (Any walk through will be appreciated)
V-tables (or virtual tables) are how most C++ implementations do polymorphism. For each concrete implementation of a class, there is a table of function pointers to all the virtual methods. A pointer to this table (called the virtual table) exists as a data member in all the objects. When one calls a virtual method, we lookup the object's v-table and call the appropriate derived class method.
vTable (virtual table) is an implementation detail of dynamic dispatch (virtual
methods).
See C++-Lite-Faq for more details.
For all it's worth, it is not a standard C++ terminology. It is just an implementation detail used by the implementation to implement virtual functions/dynamic binding
来源:https://stackoverflow.com/questions/3554909/what-is-vtable-in-c