No, C does not have a boolean variable type. One can use ints, chars, #defines or
enums to achieve the same in C.
#define TRUE 1
#define FALSE 0
enum bool {false, true};
An enum may be good if the debugger shows the names of enum constants when examining
variables.
enums to achieve the same in C.
#define TRUE 1
#define FALSE 0
enum bool {false, true};
An enum may be good if the debugger shows the names of enum constants when examining
variables.
No comments:
Post a Comment