#include <iostream>
struct ManyIntegers {
int a,b,c,d;
};
int main () {
union {
int ManyIntegers::* p;
unsigned long l;
} x;
x.p = &ManyIntegers::a;
std::cout << "p = &ManyIntegers::a = " << (x.l) << std::endl;
x.p = &ManyIntegers::b;
std::cout << "p = &ManyIntegers::b = " << (x.l) << std::endl;
x.p = &ManyIntegers::c;
std::cout << "p = &ManyIntegers::c = " << (x.l) << std::endl;
x.p = &ManyIntegers::d;
std::cout << "p = &ManyIntegers::d = " << (x.l) << std::endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKc3RydWN0IE1hbnlJbnRlZ2VycyB7CgogICAgaW50IGEsYixjLGQ7Cn07CgppbnQgbWFpbiAoKSB7CgogICAgdW5pb24gewogICAgICAgIGludCBNYW55SW50ZWdlcnM6OiogcDsKICAgICAgICB1bnNpZ25lZCBsb25nIGw7CiAgICB9IHg7CgoKICAgIHgucCA9ICZNYW55SW50ZWdlcnM6OmE7CiAgICBzdGQ6OmNvdXQgPDwgInAgPSAmTWFueUludGVnZXJzOjphID0gIiA8PCAoeC5sKSA8PCBzdGQ6OmVuZGw7CgogICAgeC5wID0gJk1hbnlJbnRlZ2Vyczo6YjsKICAgIHN0ZDo6Y291dCA8PCAicCA9ICZNYW55SW50ZWdlcnM6OmIgPSAiIDw8ICh4LmwpIDw8IHN0ZDo6ZW5kbDsKCiAgICB4LnAgPSAmTWFueUludGVnZXJzOjpjOwogICAgc3RkOjpjb3V0IDw8ICJwID0gJk1hbnlJbnRlZ2Vyczo6YyA9ICIgPDwgKHgubCkgPDwgc3RkOjplbmRsOwoKICAgIHgucCA9ICZNYW55SW50ZWdlcnM6OmQ7CiAgICBzdGQ6OmNvdXQgPDwgInAgPSAmTWFueUludGVnZXJzOjpkID0gIiA8PCAoeC5sKSA8PCBzdGQ6OmVuZGw7CgogICAgcmV0dXJuIDA7Cn0K