单例模式

2019-07-23  本文已影响0人  Magic11
class Singleton {
  private:
     Singleton();
  
public:
  static Singleton * getInstance() {
      static Singleton instance;
      return &instance;
  }
}

https://blog.csdn.net/king457757706/article/details/51887611

https://blog.csdn.net/stpeace/article/details/78058361

https://blog.csdn.net/stpeace/article/details/68953253

上一篇 下一篇

猜你喜欢

热点阅读