Posted by Jared Anderson on July 22, 1999 at 22:14:42:
In Reply to: Re: bool problems (????) ... NOW what ... posted by hussein on July 22, 1999 at 22:08:29:
: : Okay ... now I can't figure out why in the world I'm getting an "undeclared identifier" when I'm setting booleans to TRUE or FALSE (ex. "first = FALSE;" --> error).
: : It's especially strange since it's giving me a warning about the same line(s): forcing boolean to true or false (performance warning) ...
: could it be the uppercase/lowercase stuff ?
I don't believe so, it works for some assignments and not others ... (?!)
: besides, where did "boolean" come from ? is it a feature of VC++ ? i dont remember std C++ having such a data type ... maybe u can get around the problem by defining "#define FALSE 0" and "#define TRUE 1" ???
The type is actually "bool" for boolean; I THINK it's a general C++ feature, not just VC++, but I could be wrong.
"In theory", a "bool" only takes up one bit, of course ... 0 or 1, FALSE or TRUE.
I'll try your #define idea, though ...
Thanks
Jared