stdbool
#include<stdio.h>
#include<stdbool.h>
int main()
{
float score;
scanf("%f",&score);
bool a,b;
a=score>=60;
b=socre<=69;
if(a==ture&&==true)
printf("The grede is C\n");
return o;
}
编译器提示stdbool.h错误
刚开始以为是#include<stdio.h>
没加 后来加了 一样 这是为何 要怎么写?
[解决办法]
C语言没有bool
[解决办法]
C99标准中引入的bool类型,C89中没有。可能是你的编译器支持C89,而不支持C99标准。你可以尝试一下:-std=c99在编译的时候加上去。