Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!wuarchive!mit-eddie!uw-beaver!zephyr.ens.tek.com!tektronix!reed!minar From: minar@reed.bitnet (Nelson Minar,L08,x640,7776519) Newsgroups: comp.lang.c++ Subject: Private Enumerations? Message-ID: <15414@reed.UUCP> Date: 5 Sep 90 00:58:17 GMT Sender: news@reed.UUCP Reply-To: minar@reed.bitnet (Nelson Minar) Organization: Reed College, Portland, OR Lines: 25 I'm fairly new to C++, so forgive me if this question is malformed. Is there a way, or should there be a way, to allow enumerations that have scope only within their class? For example: class Boolean { public: enum boolEnum { false, true }; boolEnum value; } so then I could say main() { Boolean bool; int foo; bool.value = true; foo = true; // ILLEGAL - out of scope } currently I am declaring the enumeration to have global scope, which is displeasing: it would allow foo to be assigned as mentioned.