Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!ut-emx!nowhere!sking From: sking@nowhere.uucp (steven king) Newsgroups: comp.lang.c++ Subject: Re: Classes with limited #'s of instances Message-ID: <9008160427.690@nowhere.uucp> Date: 16 Aug 90 04:27:05 GMT Organization: nowhere Lines: 23 Beware of using something like foo::foo() { if(this) // some sort of error signaling } to prevent automatic creation ("on the stack") ie. main() { foo foobar; } it will also prevent using the class as a base class or using it as a global since in both cases the value passed as _this_ to the constructor will be a valid non null pointer. -- NONE of the standard disclaimers apply =============================================================================== UUCP: ...!cs.utexas.edu!ut-emx!nowhere!sking