今天才发现C语言中原来没有定义bool类型。
如果要在C语言中使用bool类型,可以自己定义。
定义方式如下:
#ifndef __cplusplus
typedef char bool;
#define false 0
#define true 1
#endif
今天才发现C语言中原来没有定义bool类型。
如果要在C语言中使用bool类型,可以自己定义。
定义方式如下:
#ifndef __cplusplus
typedef char bool;
#define false 0
#define true 1
#endif