Does every object of virtual class have a pointer to vtable?
Or only the object of base class with virtual function has it?
Where did the vtable stored? code
Vtable is a per class instance, i.e., if I have 10 objects of a class which has a virtual method there is only one vtable which is shared among all the 10 objects.
All the 10 objects in this case point to same vtable.