65,211
社区成员
发帖
与我相关
我的任务
分享
class C
{
public:
static const C* getObj() {return obj;}
static void initObj() {}
private:
static C* obj;
};
C* C::obj = new C;
class A
{
private:
static const C* obj;
};
const C* A::obj = C::getObj();