Mail Archives: djgpp/1997/04/08/00:27:31
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 <fighteer AT cs DOT com>
* 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
- Raw text -