Date: Fri, 14 Jun 1996 12:28:08 +0400 (MSD) From: "Alexander V. Lukyanov" Message-Id: <199606140828.MAA05211@video.yars.free.net> To: djgpp AT delorie DOT com, j DOT aldrich6 AT genie DOT com Subject: Re: How are bool's allocated? > 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.