Topic: Singleton_Objects


Author: dhollman@phage.cshl.org ( CSHL)
Date: 7 Apr 1993 18:13:01 -0400
Raw View
I a bit of a novice OOP-person (must be politically correct), and I am having
some strange errors for reasons I cannot pin down.


When declaring an object in this fashion:

class {
public:
     int i;
     char c;
     void show(void);
} singleton_object;

The compiler (this is Turbo C++, not Borland C++ with all the bells
and whistles and 500 dollar price tag) just doesn't seem to get it!
It refuses to recognize any references to, say: singleton_object.i or
even singleton_.object.show . It is really pissing me off AND holding my
work/learning back. Is there anything obviously wrong that I am doing?
Perhaps some compiler option? For my sake, I would appreciate it if you
could reply via Email, but since you will be doing me a favor if you'd
rather reply through USENET, that's okay too.

David Hollman
dhollman@cshl.org

"All pigs are mammals, but all mammals are not pigs."