#include <iostream>
#include <iomanip>

using namespace std;

struct A { int a; };
struct B { int b; };
struct C { int c; };

struct ABC
    : public A
    , public B
    , public C
{
    int abc;
};

int main()
{
	ABC* abc = new ABC;
	abc->a = 1;
	abc->b = 2;
	abc->c = 3;
	abc->abc = 4;
	int* data = reinterpret_cast<int*>(abc);
	for(int i=0; i<sizeof(ABC)/sizeof(int); i++)
	{
		cout << "0x" << hex << setfill('0') << setw(2*sizeof(int)) << data[i] << endl;
	}
}