C++ introduced a built-in boolean data type called bool . The presence of this new type makes it unnecessary to use an int with the values and 1 and improves type safety. The two possible values of a bool are true and false --these are reserved words. The compiler knows how to coerce a bool into an int and vice-versa.
If your compiler does not have the bool type and false and true keywords, an alternative is to produce such a type using a typedef of an enumeration representing the two possible values: