As you might know V-table is a mechanism which is used to achieve polymorphism...and its implementation details shouldnt matter to someone using C++...but yeah its always good to know...its interesting....
So its just a array(V-table) of function pointer, one v-table for each class.
so compilers knows what all fucntions are virtual for a class, so it fills v-table with all the virtual functions.
Now lets say you derive from a class with virtual functions, it will have its own v-table (array).... so first compiler will fill v-table of derive class with fucntion ptrs of base class and change it with virtual function implemented in derive class.....
Every object of a class with atlest 1 virtual function will have vPtr member pointing to vtable for its class.
If you want to see contents on v-table, you can see it in watch window (in visual studio IDE. watch for vPtr variable)
some one asked
"Can you acctually call the Vtable directly opposed to doing the:"
note that its a array of function pointers...so i dont think you can use function pointer if you dont know the signature of tht function....Moreover i dont see any reason why anyone would need to call function using v-table...doesnt make sense...
