Click here to Skip to main content
16,006,594 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: The troublesome BOOKMARK question of VC6.0 ! help ~~~~ Pin
CNHKfsh9-Aug-05 17:02
CNHKfsh9-Aug-05 17:02 
Generalto BOOL or not to bool Pin
BadKarma8-Aug-05 23:50
BadKarma8-Aug-05 23:50 
GeneralRe: to BOOL or not to bool Pin
Eytukan9-Aug-05 0:09
Eytukan9-Aug-05 0:09 
GeneralRe: to BOOL or not to bool Pin
Marc Soleda9-Aug-05 0:14
Marc Soleda9-Aug-05 0:14 
GeneralRe: to BOOL or not to bool Pin
David Crow9-Aug-05 2:48
David Crow9-Aug-05 2:48 
GeneralRe: to BOOL or not to bool Pin
Marc Soleda9-Aug-05 3:12
Marc Soleda9-Aug-05 3:12 
GeneralRe: to BOOL or not to bool Pin
Tim Smith9-Aug-05 3:54
Tim Smith9-Aug-05 3:54 
GeneralRe: to BOOL or not to bool Pin
V.9-Aug-05 0:16
professionalV.9-Aug-05 0:16 
well actually you can convert them.

The main difference is that a BOOL is actually an integer (4 bytes I think) and TRUE and FALSE are defined values to 1 and 0 respectively.

a bool is a class I think, where the data integrety (true/false) is forced more then the BOOL datatype.
(a little warning: bool can have a sort of tri-state, never use something like the following:
bool mybool;<br />
<br />
// set mybool<br />
<br />
if(mybool == true){  //or mybool == false<br />
  //code<br />
}<br />
else{<br />
  //code<br />
}

but use

if(mybool){   //or !mybool<br />
  //code<br />
}<br />
else{<br />
  /code<br />
}


)

both types are used often. BOOL is especially used on structures like:
BOOL myBOOL;<br />
<br />
//set myBOOL<br />
if(myBOOL == TRUE){<br />
<br />
}<br />
else{<br />
  if(myBOOL == 3){<br />
<br />
  }<br />
  else{<br />
    //end so on<br />
  }<br />
}<br />
} 

I'll leave it up to you whether you find this good or bad design.


I hope this helps you a bit.
good luck!

No hurries, no worries.
GeneralRe: to BOOL or not to bool Pin
Tim Smith9-Aug-05 3:55
Tim Smith9-Aug-05 3:55 
GeneralRe: to BOOL or not to bool Pin
John R. Shaw9-Aug-05 10:38
John R. Shaw9-Aug-05 10:38 
GeneralUsing GAMS in a VIsual C++ program Pin
Anonymous8-Aug-05 23:47
Anonymous8-Aug-05 23:47 
Generaltype conversion Pin
Member 20725788-Aug-05 22:55
Member 20725788-Aug-05 22:55 
GeneralRe: type conversion Pin
jan larsen8-Aug-05 23:30
jan larsen8-Aug-05 23:30 
GeneralRe: type conversion Pin
toxcct9-Aug-05 0:32
toxcct9-Aug-05 0:32 
GeneralRe: type conversion Pin
Maximilien9-Aug-05 2:49
Maximilien9-Aug-05 2:49 
Generalproblem of transfering file from one pc 2 another Pin
manishgandhi8-Aug-05 22:24
manishgandhi8-Aug-05 22:24 
GeneralRe: problem of transfering file from one pc 2 another Pin
ThatsAlok8-Aug-05 22:44
ThatsAlok8-Aug-05 22:44 
GeneralRe: problem of transfering file from one pc 2 another Pin
Marc Soleda8-Aug-05 22:53
Marc Soleda8-Aug-05 22:53 
GeneralHelp in Socket programming! Pin
javaClaude8-Aug-05 21:08
javaClaude8-Aug-05 21:08 
Generalchild frame Pin
Anonymous8-Aug-05 20:57
Anonymous8-Aug-05 20:57 
GeneralRe: child frame Pin
John R. Shaw8-Aug-05 22:28
John R. Shaw8-Aug-05 22:28 
GeneralSerial Communication Pin
Member 20251768-Aug-05 20:27
Member 20251768-Aug-05 20:27 
GeneralRe: Serial Communication Pin
Jose Lamas Rios8-Aug-05 20:37
Jose Lamas Rios8-Aug-05 20:37 
QuestionHow to add &quot;X&quot; in tabctrl to close tab Pin
Nipun8-Aug-05 19:32
Nipun8-Aug-05 19:32 
AnswerRe: How to add &quot;X&quot; in tabctrl to close tab Pin
Moak26-Jun-06 4:10
Moak26-Jun-06 4:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.