We have shown you two different approaches to the same problem. In tbscope's code MyStruct is just a public structure, in my code it is defined in the scope of the MyClass class, so its full name is MyClass::MyStruct. My code is better encapsulated, his is more reusable.