我正在尝试编写一个返回布尔值的函数...程序的语法似乎是正确的,但编译器却出现了错误...
我已经包含了以下头文件:
#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)
我尝试过使用大小写不同的"TRUE,false",但似乎没有起作用...