From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: enum and djgpp Date: Mon, 07 Apr 1997 06:31:30 -0700 Organization: Two pounds of chaos and a pinch of salt Message-ID: <3348F732.6C6F@cs.com> References: <33494D3F DOT 606307FA AT cs DOT buffalo DOT edu> Reply-To: fighteer AT cs DOT com NNTP-Posting-Host: ppp226.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 27 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp mtc AT acsu DOT buffalo DOT edu wrote: > > I am just try to do a simple enum like > > enum constants { false = 0, true = 1}; > > This statement which will compile under other compilers will not > with djgpp I get a parse error before false and a missing ';' after > right bracket error. any ideas ? In GNU C++, the constants 'boolean' (or is it 'bool'?), 'false' and 'true' are already defined as part of the C++ syntax. You get a parse arror because they are reserved words. You can either use the builtin definitions, or use 'FALSE' and 'TRUE', or whatever else suits your fancy. -- John M. Aldrich * Anything that happens, happens. * Anything that, in happening, causes something else to happen, causes something else to happen. * Anything that, in happening, causes itself to happen again, happens again. * It doesn't necessarily do it in chronological order, though. --- Douglas Adams