class Foo { public: int a; int b; }; Foo x; bool sameAddress = (void*)&x == (void*)&(x.a);
I have not yet come acros