1、BOOL is Microsoft's macro . In fact, is only 4 bytes of int type. This definitions ,you can find it in the VC setup directory (WINDEF.h、AFX.H), It can be found this following code:
// WINDEF.H
typedef unsigned long DWORD;
typedef int BOOL;
typedef unsigned char BYTE;
typedef unsigned short WORD;
typedef float FLOAT;
// AFX.H
#define FALSE 0
#define TRUE 1
#define NULL 0
bool is C/C + + keywords, about MSDN2005 help document, explained below: This keyword is a built-in type. A variable of this type can have values true and false. Conditional expressions have the type bool and so have values of type bool. For example, i!=0 now has true or false depending on the value of i. The values true and false have the following relationship: When a postfix or prefix ++ operator is applied to a variable of type bool, the variable is set to true. The postfix or prefix -- operator cannot be applied to a variable of this type. The bool type participates in integral promotions. An r-value of type bool can be converted to an r-value of type int, with false becoming zero and true becoming one. As a distinct type, bool participates in overload resolution. 2、Define BOOL and bool of the reasons. In the memory space,the true、false、null is occupying 1 bytes.But TRUE、FALSE、NULL is occupying 4 bytes. According to the Intel CPU's paging memory mechanism, 4 bytes can prevent memory inattentive, it can prevent to produce more ram pieces,and help the data transmission. ;P