bool type

   
bool type Boolean (logical) type specifier

  simple-type-specifier  := bool 

The bool type represents Boolean or logical values. The only valid values of the bool type are the literals true and false . A bool expression can be promoted to an integer: false becomes and true becomes 1 . Arithmetic, enumerated, and pointer values can be converted to bool : is false , a null pointer is false , and anything else is true .

See Also

and , false , not , or , true , type , Chapter 2, Chapter 3

   


C++ in a Nutshell
C++ in a Nutshell
ISBN: 059600298X
EAN: 2147483647
Year: 2005
Pages: 270
Authors: Ray Lischner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net