class myclass{private:static myclass *_self;myclass();public:static myclass* Instance() {if (_self==NULL) _self=new myclass;return _self; }};myclass *myclass::_self=NULL;
myclass* coolclass=NULL;void mycoolfunction(){ coolclass=myclass::Instance();}