标签:style http color os 使用 io strong ar div
class Singleton
{
private:
	static Singleton * single;
	Singleton(){}
public:
	static Singleton * GetInstance()
	{
		if(single == NULL)
			single = new Singleton();
		return single;
	}
};
Singleton * Singleton::single = NULL;
int _tmain(int argc, _TCHAR argv[])
{
	Singleton * s1 = Singleton::GetInstance();
	Singleton * s2 = Singleton::GetInstance();
	if(s1 == s2)
		cout << "Same" << endl;
	else 
		cout << "Different" << endl;
}标签:style http color os 使用 io strong ar div
原文地址:http://blog.csdn.net/lightupheaven/article/details/38843315