bool literal
From cppreference.com
[edit] Syntax
true | (1) | ||||||||
false | (2) | ||||||||
[edit] Explanation
- boolean true (value of 1)
- boolean false (value of 0)
[edit] Example
std::cout << std::boolalpha << true << '\n' << false << '\n' << std::noboolalpha << true << '\n' << false << '\n';
Output:
true false 1 0