我正在尝试创建一个返回类型为布尔值的函数......程序的语法似乎是正确的,但编译器给出了错误......
我包含的头文件是:
#include<stdio.h>
#include<stdlib.h>
我创建的功能是:
34.bool checknull(struct node* node){
35. if ( node != NULL )
36. return TRUE;
37.
38. return false;
39.}
我在编译时得到的是
bininsertion.c:34:1: error: unknown type name ‘bool’
bininsertion.c: In function ‘checknull’:
bininsertion.c:36:10: error: ‘TRUE’ undeclared (first use in this function)
bininsertion.c:36:10: note: each undeclared identifier is reported only once for each function it appears in
bininsertion.c:38:9: error: ‘false’ undeclared (first use in this function)
我用小写和大写字母都试过“真,假”,但似乎没有用......