|
From: St0fF 64 <st...@gm...> - 2002-01-17 11:56:51
|
Hi! AFAIK Ioannis is completely right (as always). But what you should know is that you can convert BOOLs to chars or whatever numerical type and actually calculate with it :) (int)false should be '0', (int)true should be '1'. So you could write stuff like if (mybool) a+=b; equals a+= (int)mybool * b; ... should be as it is in Basic ... St0fF. At 20:44 16.01.2002 +0200, you wrote: >In C++ there is the built in type bool with possible values true and >false. > > > >Ioannis > >* Ioannis Vranos >* Programming pages: http://www.noicys.d2g.com >* Alternative URL: http://run.to/noicys > > > > -----Original Message----- > > From: dev...@li... > > [mailto:dev...@li...] On Behalf > > Of David Mcken > > Sent: Saturday, February 16, 2002 7:52 PM > > To: dev...@li... > > Subject: [Dev-C++] Some help on BOOL > > > > > > I have been told that boolean logic is represented > > by using numbers yet when I type bool I see it bold. > > Will some one please tell me if there is a type bool and > > what states it uses (ex. true or false, or dose it still > > accept numbers > > > > for now I have been putting this at the beginning of all my code > > > > //Define True and False > > #define false 0 > > #define true !false > > > > I am a newbie just out of high school in the Caribbean and I > > am looking to advance my skills in C and C++ (for now all I > > know is Turbo Pascal which has a boolean type) > > > > > > _______________________________________________ > > Dev-cpp-users mailing list > > Dev...@li... > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |