Object layout in case of virtual functions and multiple inheritance
The memory layout and the vtable layout depend on your compiler. Using my gcc for instance, they look like this: sizeof(int) == 4 sizeof(A) == 8 sizeof(B) == 8 sizeof(C) == 20 Note that sizeof(int) and the space needed for the vtable pointer can also vary from compiler to compiler and platform to platform. The … Read more