Mail Archives: djgpp/2001/04/19/08:04:46
Hi!
Thanks for Your e-mail (only 15 copies to me? ;-).
Are You working on new C/ C++ standard and gcc 3 version (Java included?) or
swimming somewhere?
****** Alkuperäinen viesti *****
> Otsikko/ aihe: FW: Re: bool type
> Kenelle: djgpp AT delorie DOT com
> Keneltä: Jack Klein <jackklein AT spamcop DOT net>
> PVM: Thu, 19 Apr 2001 03:40:35 GMT
>On Wed, 18 Apr 2001 08:28:43 GMT, gehok55 AT hotmail DOT com (Josh) wrote in
>comp.os.msdos.djgpp:
>
>> i dont seem to have a bool.h in any of my djgpp directories :|
>> i added this
>>
>> typedef int bool;
>> #undef TRUE
>> #define TRUE 1
>> #undef FALSE
>> #define FALSE 0
>>
>> which fixes the problem (temporarily) .. but im a little worried. isnt
>> C meant to have a bool type?
>> thanks
>>
>> >One problem could be that you aren't #including
>> >bool.h.
>> >Hope that helps (short but sweet...)
>> >
>> >-Rafael Frongillo
>>
>> >>im having some troubles declaring boolean variables..
>> >>where am i going wrong?
>> >>
>> >>typedef struct {
>> >> int color;
>> >> bool filled;
>> >>}object;
>> >>
>> >>nasty stuff happens when i use the bool type.
>>
>>
>>
>> -Josh
>> gehok55 AT hotmail DOT com
>
>The 1999 update to the C standard added a new type called _Bool (the
>combination of leading underscore and upper case letter puts it in the
>namespace reserved for the implementation) which is similar, but not
>identical to, the C++ type bool.
>
>If you include the C99 standard header <stdbool.h>, it defines the
>four macros bool, true, false, and __bool_true_false_are_defined.
>
>If your gcc version supports _Bool, you can use this type without
>including any header. If it supports _Bool and comes with the header
><stdbool.h> (or you can make your own <stdbool.h>, it's a pretty
>simple header), then you can use the C99 macro bool.
>
>Or you can wait for gcc 3 to be released, and ported to DJGPP. It's
>due Real Soon Now, and should include a large increase in ISO C++ and
>C99 features.
>
>--
>Jack Klein
>Home: http://JK-Technology.Com
>
***** Alkuperäisin viestin loppu *****
With Best Regards
Veli Suorsa
---
"People must believe to the future to be able to live!"
---------------------------------- J.V.Snellman, 1890.
Oulu, FINLAND
Mailto:VJSuorsa AT Surfeu DOT Fi
http://members.surfeu.fi/veli.suorsa/
http://www.surfeu.fi
- Raw text -