keywords:bool

C++ Reference

bool

The keyword bool is used to declare Boolean logic variables; that is, variables which can be either true or false. For example, the following code declares a boolean variable called done, initializes it to false, and then loops until that variable is set to true.

     bool done = false;
     while( !done ) {
     ...
     }

Also see the data types page.

Related Topics: char, double, false, float, int, long, short, signed, true, unsigned, wchar_t