Jump to content

Bool

From C++ Forever
Revision as of 20:59, 24 March 2025 by Robertvokac (talk | contribs) (Created page with "Bool is primitive data type holding 2 possible values: true or false. == Disadvantages == The data type bool allocates 8 bits of memory, but only one bit is needed, this is wasteful. == Alternatives == Bit fields")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Bool is primitive data type holding 2 possible values: true or false.

Disadvantages

The data type bool allocates 8 bits of memory, but only one bit is needed, this is wasteful.

Alternatives

Bit fields