摘要:
c++单例模式实现的最基本的代码: 1 #include <iostream> 2 using namespace std; 3 4 class Singleton 5 { 6 public: 7 static Singleton * getInit();//创建一个公有的初始化函数用来调用构造函数 8 private: 9 static Singleton * singleton;//该类的指针变量。10 Singleton(){}//该类的构造函数。11 };12 Singleton* Singleton::singleto... 阅读全文
posted @ 2013-01-09 16:10
蓝清凡
阅读(270)
评论(0)
推荐(0)

浙公网安备 33010602011771号