Singleton* getInstance()
{
static Singleton Instance;
return &Instance.
}
class Singleton{
static Singleton *pInstance;
Singleton *getInstance()
{
if(pInstance==NULL)
pInstance= new Singleton;
return pInstance;
}
};
Singleton *Singleton::pInstance=NULL;
Singleton *Singleton::pInstance=NULL;
#ifndef _MY_MAIN_
#define _MY_MAIN_
#include <iostream.h>
#include <windows.h>
#include <gl\Gl.h>
#include "Singleton.h"
#include "cSmtPtr.h"
#endif