Skip to content

Latest commit

 

History

History
11 lines (5 loc) · 466 Bytes

单例模式.md

File metadata and controls

11 lines (5 loc) · 466 Bytes

单例模式

1.构造函数私有化

- class  ChairMan  public:  static  ChairMar1 * getlnstacne  return singleMan,  private:  Chairman  b) 01  Chai rM const ChairMan  // public:  private:  static  ChairMart  * singleMan,  thairMar1  Chairman • :singleMan -  Chairman  new

2.

ChairMan * cl = Chairhan: •.åetlnstacne()  Chairlan * c2 = Chairhan: ;