bool is a C++ keyword BOOL is not, true & false are C++ keyword TRUE & FALSE are not. bool stands for boolean, a condition that is either true or false, a 0 or a 1.
1 2 3 4 5 6 7 8 9
bool bQuit = false;
int count = 0;
while (!bQuit)
{
count++;
if (count == 10) bQuit = true;
}
However, if you would have written the same code and replaced false with FALSE and true with TRUE, in some implementations they work the same way, why? Because...
They are the same thing except bool is for C++. BOOL is used in C...
typedef int BOOL;
In C it is a defined type of type int ...... you can store 0 or 1 or anything.....
BOOL junk; // can store a -1, true, false or 0 what ever it may be even 236 if you wanted too...
bool junk; // cannot store -1 will probably crash your program or do nothing, can only store 0 or 1.
If you are only concerned with true or false, use bool if you want to store a condition other than true or false.....not recommended but you might want to use BOOL but thats up to you...
typedef int BOOL;
can be the same was
int BOOL;
I'm speculating too much now...i'll let someone else pitch in...