February 2022
Beginner
848 pages
22h 40m
English
Using bits is an efficient way of storing settings and flags. The Standard Template Library (STL) supplies classes that help organize and manipulate bitwise information. This lesson introduces you to
■ The bitset class
■ The vector<bool> class
bitset Classstd::bitset is the STL class designed for handling information in bits and bit flags. std::bitset is not an STL container class because it cannot resize itself. It is a utility class that is optimized for working with a sequence of bits whose length is known at compile time.
Tip
To use the class std::bitset, include the header <bitset>:
#include<bitset>
std::bitsetThe bitset template class requires you to supply one ...
Read now
Unlock full access