I am little confused about vptr and representation of objects in the memory, and hope you can help me understand the matter better.
Consider B
inhe
If object B inherits from A then the memory representation for B will be the following:
If you have B* b = new B(); (A)b->f() then:
Every object will have it's own vtable (don't take this for granted, as I have to research it
Take a look at this for an example of vtable layour when dealing with multiple inheritance
See this for a discussion about the diamond inheritance and the vtable representation