how to use bool function in c???
how to use bool function in c???
What do you mean by bool "function"?
bool is true false.
In C, you can just define it, as zacs7 suggested.
Code:#define TRUE 1 #define FALSE 0
Double Helix STL
I like:
But I am still new to C. I think the advantage with this method is that it allows you to declare a variable like:Code:typedef enum BOOL { FALSE, TRUE } BOOL;
BOOL done = FALSE;
Instead of:
int done = FALSE;
Am I missing any other differences between #define and typedef for a bool type?