bool [C++ Reference]
Keywords: keywords,bool
Date: 2008-10-14T15:42:04-0700

[[bool]]
C++ Reference
Translations of this page?:

- en
- br-pt
- cn
- cz
- de
- es
- fr
- it
- jp
- nl
- pl
- ro
- ru
- sk
- tr
- tw

## 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

Edit this page • Old revisions
• • • Login • Index • Recent changes • RSS • cc •