Code:
#include<stdio.h>
int main()
{
        bool a=false;
        a=true;
        if(a) printf("a e adevarat\n");
        else printf("a e fals\n");
        return 0;
}
why can't i do this using gcc version 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu9) ?
it tells me that:
Code:
gcc -o bool bool.c -Wall
bool.c: In function ‘main’:
bool.c:4: error: ‘bool’ undeclared (first use in this function)
bool.c:4: error: (Each undeclared identifier is reported only once
bool.c:4: error: for each function it appears in.)
bool.c:4: error: syntax error before ‘a’
bool.c:5: error: ‘a’ undeclared (first use in this function)
bool.c:5: error: ‘true’ undeclared (first use in this function)
make: *** [all] Error 1
thank you!