原来C里面也有bool类型,以前只知道用 整型来判断。 C99以后,在 <stdbool.h> 中也加入了bool类型。 bool flag = true; true的时候, 值为1, false 为0