Mail Archives: djgpp/1996/04/16/09:44:53
>
>
> 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
- Raw text -