/* This sample code uses a singleton. */ /* The design DOES NOT allow for inheritence. */ /* If you want to inherit from a singleton */ /* class you should see me. */ #include "singleton.h" Singleton* Singleton::_instance=0; main() { Singleton* theSingleton; theSingleton = Singleton::Instance(); theSingleton->printMessage(); }