Date: Tue, 16 Apr 1996 15:12:59 +0200 (MET DST) From: "Christoph P. Kukulies" Subject: Re: Enum Definitions In-reply-to: <1996Apr15.215610.13409@pmafire.inel.gov> To: kurt AT pmafire DOT inel DOT gov (Kurt Fielding) Cc: djgpp AT delorie DOT com Reply-to: Christoph Kukulies Message-id: <199604161312.PAA03770@gilberto.physik.rwth-aachen.de> MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit > > > I'm having trouble defining enum types in v2 of djgpp. The following > statement will not work: > > enum Boolean { false, true }; > > I get the message: ... parse error before `false'. > > The "info" documentation tends to make me believe that enum types are possible > but I can't find the right combination. Any body have a clue what is going on? > Something this simple shouldn't be such a problem! > > Thanks for your help.... It looks like you are invoking the g++ (C++) compiler instead of the C compiler caused by either using an extension .cpp or .C (upper case C) the latter more unlikely since DOS isn't case sensitive though I don't know wether make is or V2 has an option for command line case sensitivity. false and true are reserved words in C++. (I'm just stating that without knowing it definitely :-) Change that to enum Boolean {farse,tlue}; and it will work :-) > > Kurt > --Chris Christoph P. U. Kukulies kuku AT gil DOT physik DOT rwth-aachen DOT de