单例模式 c++实现
摘要:
singleton.h:#ifndef _SINGLETON_H_#define _SINGLETON_H_// Singleton 模式#include "sync.h"// #define NULL ((void *)0)template <typename T>class Singleton{private: Singleton() {}; // ctor hidden Singleton (Singleton const&); // copy ctor hidden Singlet... 阅读全文
posted @ 2013-01-02 22:42 zhuyf87 阅读(248) 评论(0) 推荐(0) 编辑