| struct C041 { C041() : c_(0x01) {} virtual void foo() { c_ = 0x02; } char c_; }; struct C100 : public virtual C041 { C100() : c_(0x02) {} char c_; }; struct C101 : public virtual C041 { C101() : c_(0x03) {} char c_; }; struct C110 : public C100, public C101 { C110() : c_(0x04) {} char c_; }; |
| PRINT_SIZE_DETAIL(C110) |
| The size of C110 is 16 The detail of C110 is 28 c3 45 00 02 1c c3 45 00 03 04 18 c3 45 00 01 |
| |C100,5 |C101,5 |C110,1 |C041,5 | |ospt,4,11 |m,1 |ospt,4,6 |m,1 |m,1 |vtpt,4 |m1 | |
| C110 c110; c110.c_ = 0x51; c110.C100::c_ = 0x52; c110.C101::c_ = 0x52; c110.C041::c_ = 0x53; c110.foo(); |
| 01 00423993 push 1 02 00423995 lea ecx,[ebp+FFFFF7F0h] 03 0042399B call 0041DE60 04 004239A0 mov byte ptr [ebp+FFFFF7FAh],51h 05 004239A7 mov byte ptr [ebp+FFFFF7F4h],52h 06 004239AE mov byte ptr [ebp+FFFFF7F9h],52h 07 004239B5 mov eax,dword ptr [ebp+FFFFF7F0h] 08 004239BB mov ecx,dword ptr [eax+4] 09 004239BE mov byte ptr [ebp+ecx+FFFFF7F4h],53h 10 004239C6 mov eax,dword ptr [ebp+FFFFF7F0h] 11 004239CC mov ecx,dword ptr [eax+4] 12 004239CF lea ecx,[ebp+ecx+FFFFF7F0h] 13 004239D6 call 0041DF32 |
| struct C041 { C041() : c_(0x01) {} virtual void foo() { c_ = 0x02; } char c_; }; struct C140 : public virtual C041 { C140() : c_(0x02) {} virtual void foo() { c_ = 0x11; } char c_; }; struct C141 : public virtual C041 { C141() : c_(0x03) {} virtual void foo() { c_ = 0x12; } char c_; }; struct C150 : public C140, public C141 { C150() : c_(0x04) {} virtual void foo() { c_ = 0x21; } char c_; }; |
| PRINT_SIZE_DETAIL(C041) PRINT_SIZE_DETAIL(C140) PRINT_SIZE_DETAIL(C141) PRINT_SIZE_DETAIL(C150) |
| The size of C041 is 5 The detail of C041 is f0 c2 45 00 01 The size of C140 is 14 The detail of C140 is 48 c3 45 00 02 00 00 00 00 44 c3 45 00 01 The size of C141 is 14 The detail of C141 is 58 c3 45 00 03 00 00 00 00 54 c3 45 00 01 The size of C150 is 20 The detail of C150 is 74 c3 45 00 02 68 c3 45 00 03 04 00 00 00 00 64 c3 45 00 01 |
| |C140,5 |C141,5 |C150,1 |zero,4 |C041,5 | |ospt,4,15 |m,1 |ospt,4,10 |m,1 |m,1 |4 |vtpt,4 |m1 | |
| C150 obj; PRINT_OBJ_ADR(obj) obj.foo(); |
| obj's address is : 0012F624 |
| 00423F74 lea ecx,[ebp+FFFFF757h] 00423F7A call 0041DCA3 |