Here’s what I have now in MyClass.hpp:
class CLASS
{
public:
class AAA
{
public:
char c_str[1024];
};
class BBB
{
public:
int count;
};
};
extern class CLASS CLASS;
extern class CLASS::AAA AAA;
extern class CLASS::BBB BBB;
MyClass.cpp:
class CLASS CLASS;
class CLASS::AAA AAA;
class CLASS::BBB BBB;
Access to the elements:
AAA.c_str = 0;
BBB.count = 0;
But I want to get this one access variant:
CLASS.AAA.c_str = 0;
CLASS.BBB.count = 0;
… or …
CLASS:AAA:c_str = 0;
CLASS:BBB:count = 0;
… so what I should to do with it? :c
AAAandBBBare free-standing objects, not objects inside theCLASSclass. You have to declare the objects inside theCLASSclass for it to be possible: