There are 3 definitions contained within the file:#ifndef BOOL_H #define BOOL_H typedef int Boolean; const Boolean TRUE = 1; const Boolean FALSE = 0; #endif
This allows us to guarantee that our programs will always react in the same way on all systems. You should always use TRUE in your programs, rather than the integer value assigned above:const Boolean TRUE = (1 == 1);
Next pageBoolean b = someBoolFunc(); if (b == 1) // bad idea doThis(); if (b == TRUE) // good idea doThat(); if (b) // good idea doOther();