Let say we have below program:
class A { public: virtual fun(){}; }; class B:public A { public: virtual fun(){}; }; int main() { A a1
There will be 2 vtables, one for class A and one for class B. And there will be 3 vptrs, one in a1 and two in b1(one pointing to vtable of class A and other pointing to vtable of class B).
vtables
vptrs
vtable