The default class access-specifier is private by default. private basically means than any external modification is disallowed. Adding public: before my_struct will fix the problem. public: indicates that any members below it are accessible to anything outside the class.
Are you trying to instantiate my_struct? If so, then you need to use the scope resolution operator (::). For example:
1 2 3 4
int main( )
{
my_class::my_struct InstanceName;
}
Here, you're telling the compiler that my_struct resides within my_class, not within an instantiation of my_class. The member operator (.) is used to access members of an instantiated class, not the base class.