C++ Virtual Inheritance Memory Layout
Virtual Inheritance Memory Layouts I am trying to fully understand what is happening under the hood in the memory with virtual inheritance and vTables/vPtrs and what not. I have two examples of code I have written and I understand exactly why they work however I just want to make sure I have the right idea in my mind, of the object memory layouts. Here are the two examples in a picture, and I just wish to know if my idea of the memory layouts involved are correct. Example 1: class Top { public: int a; }; class Left : public virtual Top { public: int b; }; class Right : public virtual Top {