这是我现在在 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;
我的类.cpp:
class CLASS CLASS;
class CLASS::AAA AAA;
class CLASS::BBB BBB;
访问元素:
AAA.c_str = 0;
BBB.count = 0;
但我想获得这个访问变体:
CLASS.AAA.c_str = 0;
CLASS.BBB.count = 0;
... 或者 ...
CLASS:AAA:c_str = 0;
CLASS:BBB:count = 0;
……那我该怎么办呢?:C