摘要:        
1 /** 2 * 设计模式:单例模式 3 * 模式作用:为类提供全局唯一的对象,通常用于工具类或保存程序运行数据 4 **/ 5 #include <iostream> 6 using namespace std; 7 8 class Singleton{ 9 private:10 Singleton(){11 cout<<"Initialize Singleton"<<endl;12 }13 static Singleton *instance;14 15 public:16 static Singleton* getInstanc.    阅读全文
posted @ 2012-10-15 13:17
邵贤军
阅读(284)
评论(0)
推荐(0)
        
                    
                
浙公网安备 33010602011771号