Yes, as of C99, but it's not a library. Just include <stdbool.h>.
Code:#include <stdio.h> #include <stdbool.h> int main(int argc, char * * argv) { bool b = getc(stdin) == 't' ? true : false; if(b) printf("True\n"); else printf("False\n"); }
Yes, as of C99, but it's not a library. Just include <stdbool.h>.
Code:#include <stdio.h> #include <stdbool.h> int main(int argc, char * * argv) { bool b = getc(stdin) == 't' ? true : false; if(b) printf("True\n"); else printf("False\n"); }
I am using Visual C and i get an error when I #include <stdbool.h>!! I think i found it. It seems to work with BOOL but not with bool