Mail Archives: djgpp/1996/06/14/09:15:27
> From: j DOT aldrich6 AT genie DOT com
> Reply to message 4458557 from CALVID AT GOYA DOT I on 06/13/96 10:20AM
> >In DJGPP, how is memory allocated for bool variables? Is just
> >1 bit allocated, or a whole byte? If you do sizeof(bool), it
> >returns 1, but maybe that's just a limitation of sizeof().
> >I'm planning on using a large number of bool's in a structure,
> >and I was wondering if it would be more efficient to declare
> >them all as bool's, or to use unsigned characters and use
> >bitwise ops to access each bit that way. Thanks for the info.
>
> There is no bool type in DJGPP. It is non-ANSI, leaving it up to
It *is* ANSI, but ANSI C++. In Gnu C, there is no bool, but it is in Gnu C++.
Its size depends on platform, but it can't be smaller than char, IMO.
- Raw text -