Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!usc!cs.utexas.edu!uunet!microsoft!jimad From: jimad@microsoft.UUCP (Jim ADCOCK) Newsgroups: comp.lang.c++ Subject: Re: Operator "++" applied to enumeration types. Keywords: Zortech ++ enumeration Message-ID: <71504@microsoft.UUCP> Date: 25 Mar 91 19:01:38 GMT References: <23651@well.sf.ca.us> <20065@alice.att.com> Reply-To: jimad@microsoft.UUCP (Jim ADCOCK) Distribution: comp Organization: Microsoft Corp., Redmond WA Lines: 13 In article <23651@well.sf.ca.us> nagle@well.sf.ca.us (John Nagle) writes: > Is the operator "++" permitted on enumeration types in C++? > Zortech C++ 2.1 rejects it as a request for an invalid type conversion. > Zortech C 2.1 is quite happy with it, leading me to suspect this is > policy, not a bug. But Strostrup's book is silent on the subject. By "Stroustrup's book" you seem to mean "The C++ Programming Language" not Stroustrup's later and more detailed and more up-to-date "The Annotated C++ Reference Manual." I suggest you get the later. Page 54 states: "The increment and decrement operators are not defined for enumerations...."