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:
> Are straightforward user defined enumerated data types permissible in
> gcc/g++.
Yes.
> 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
> overloaded operator function of a class. Upon trying to accomplish this
> the compiler generates a series of obscure errors, parse errors, etc.
>
Ah! ANSI C++ has defined bool, true and false as primitive types. Possibly
the errors were 'keyword..' or so. Try
main()
{
bool b=true;
}
It should compile as it is.
> If such syntax is not permissible then, is there an acceptable means of
> applying an user defined enumerated type in C++ under gcc/g++ ??
>
> /Thanks..
>
> /John
>
>
> --
> email: [EMAIL PROTECTED]
> Local mailserver , remote
>
> .
>
>
>