摘要:
意图:保证一个类仅有一个实例,并提供一个访问的全局访问点--------------------singleton.h-----------------------View Code #ifndef SINGLETON_H#define SINGLETON_Hclass singleton{public: static singleton* instance();protected: singleton();private: static singleton* _instance;};#endif //SINGLETON_H---------------------singleton.cpp- 阅读全文
posted @ 2011-03-29 14:46
suncode
阅读(339)
评论(0)
推荐(0)

浙公网安备 33010602011771号