在C语言中如何使用bool类型?

如题所述

你可以自定义bool类型

标准C语言中并没有关于bool的定义,
不过bool的定义可以是
#define bool int
#define false 0
#define true 1
有这三个宏那么就可以了

不过假如你包含windows.h或windef.h 也可以使用bool
温馨提示:答案为网友推荐,仅供参考
相似回答