I was reading this articles , was at this heading Inheritance of Base-class vPtrs , but couldn\'t understand what did he mean in this para :
"However, due to mul
If Derived inherits from Base, its vtable will extend Base's. Now, if it also inherits Base2, its vtable will not include Base2's - Base2's part will retain its vtable (updated with Derived virtual functions, if they override Base2's).
Base members Base2 members Derived members
+--+------------+----+------------+------------------+
| |
V V
Derived + Base Base2 vtable
vtable
To make the second question easier to understand, and since I enjoy drawing with fixed width font... here's the memory layout of a. For a full explanation about that expression, see James Kanze's answer.
+---+----------+
a: | | | A |
+-+-+----------+
|
V
vtable: +---+
| --+--> f2()
+---+
| --+--> f3()
+---+
HTH...