首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C语言 >

stdbool,该如何解决

2012-04-19 
stdbool#includestdio.h#includestdbool.hint main(){float scorescanf(%f,&score)bool a,basco

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在编译的时候加上去。

热点排行