I have a small doubt in Virtual Table, whenever compiler encounters the virtual functions in a class, it creates Vtable and places virtual functions address over there. It h
Whenever the program compiles the virtual table for each class is created, which makes clear to the fact that vtables are created per class basis. During run time, when the object is created the compiler assigns vptr to the object, which points to the virtual table for the particular class' object. In short the vptr is created per object basis.