报错:C++无法解析的外部符号 “private: static
报错截图如下:报错代码如下:class Singleton {public: static Singleton* GetInstance() { if (instance == nullptr) { instance = new Singleton(); } return instance; } int static test()//报错源,静态成员函数访问静态数据成员 { return i; }private: static Singleton* insta
原创
2021-04-20 15:49:41 ·
3349 阅读 ·
0 评论