踏实仙人掌

文章
6
资源
0
加入时间
4年1月24天

面试——c语言定义bool类型

C语言自定义bool类型的两种方式由于C语言以0,1分别代表false,true,可以自定义bool类型,这里有两种方式作为参考:1:定义枚举类型:typedef enum{false,true} bool;2:也可以使用预定义#ifndef bool#define bool int#endif#ifndef true#define true 1#endif#if...