D: struct Foo { int x; union { int a; struct { int b,c; } double d; } } Foo f; f.c; C++: struct Foo { int x; union { int a; struct { int b,c; } s; double d; } u; }; Foo f; f.u.s.c;