bool是C++中的一种变量类型(布尔类型),只可以写
bool x;
x = true;
x = false;
在VC++中BOOL是这样说明的:
typedef int BOOL;
也就是说BOOL是当int用的。
BOOL x;
x = 1;
x = 0;
当然为了方便,VC++已经定义了
#define TRUE 0
#define FALSE 1
bool x;
x = true;
x = false;
在VC++中BOOL是这样说明的:
typedef int BOOL;
也就是说BOOL是当int用的。
BOOL x;
x = 1;
x = 0;
当然为了方便,VC++已经定义了
#define TRUE 0
#define FALSE 1