I'm trying to make a function with return type as boolean...the syntax of the program seems to be correct but the compiler is giving errors....
The header files I've included are:
#include<stdio.h>
#include<stdlib.h>
the function I've created is:
34.bool checknull(struct node* node){
35. if ( node != NULL )
36. return TRUE;
37.
38. return false;
39.}
and what I'm getting at compile time is
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)
I've tried "TRUE,false" both in small and capital letters but doesn't seem to work...