带你学c带你飞第6课
#include <stdio.h>int main ()
{
printf("int = %d\n", sizeof(int));
printf("short int = %d\n", sizeof(short));
printf("long int = %d\n", sizeof(long int));
printf("long long int = %d\n", sizeof(long long int));
printf("char = %d\n", sizeof(char));
printf("_Bool = %d\n", sizeof(_Bool));
printf("float = %d\n", sizeof(float));
printf("double = %d\n", sizeof(double));
printf("long double = %d\n", sizeof(long double));
return 0;
}
Desktop\fishC\随堂\未命名3.cpp In function 'int main()':
Desktop\fishC\随堂\未命名3.cpp '_Bool' was not declared in this scope
为什么会提示这个
C使用bool形你要引入头文件 bin554385863 发表于 2019-10-20 08:49
C使用bool形你要引入头文件
请问具体需要怎么做呢,小白 不是很明白 WwangHB 发表于 2019-10-20 14:15
请问具体需要怎么做呢,小白 不是很明白
首先你的编译器必须要支持C99,
其次要#include <stdbool.h>
页:
[1]