Hi!
........................................................................
"One of the symptoms of an approaching nervous breakdown is the belief
that one's work is terribly important."
- Bertrand Russell (1872-1970)
........................................................................
On Wed, 10 Jun 1998, holotko wrote:
> holotko wrote:
>
> > Are straightforward user defined enumerated data types permissible in
> > gcc/g++.
> > For example if I wished to declare:
> >
> > enum boolean {true, false};
> >
> > so that I can use the defined data type "boolean", as a return type for
> >
>
> Okay, I answered my own question. In my haste I neglected to do:
>
> typedef enum Boolean {True, False} boolean;
>
> and I also has a couple obscure syntax errors that caused the compiler to
> spew out a bunch of equally obscure error messages. Everything works Ok
> now.. Sorry... Any further comments are of course welcome...
>
> /John
>
I repeat this: bool is a primitive type in ANSI C++ (and, of course, in
g++). Also true and false are keywords. See Stroustrup's "The Design and
Evolution of C++"
> > email: [EMAIL PROTECTED]
> > Local mailserver , remote
> >
> > .
>
>
>
> --
> email: [EMAIL PROTECTED]
> Local mailserver , remote
>
> Women are generally smarter than men.
>
>
>