摘要:
定义:单件模式确保一个类只有一个实例,并提供一个全局访问点实现一:#include <iostream>using namespace std;class CSingleton{public: static CSingleton* getInstance(); static void cleanInstance(); int getValue(); void setValue(int iValue);private: int m_iValue; static CSingleton* m_pSingleton; CSingleton(); ~CSi... 阅读全文
posted @ 2011-12-29 22:55 开源云 阅读(4127) 评论(0) 推荐(0)
浙公网安备 33010602011771号