stl:bitset:start

C++ Reference

C++ Bitsets

C++ Bitsets give the programmer a set of bits as a data structure. Bitsets can be manipulated by various binary operators such as logical AND, OR, and so on.

Constructorscreate new bitsets
Operatorscompare and assign bitsets
anytrue if any bits are set
countreturns the number of set bits
flipreverses the bitset
nonetrue if no bits are set
resetsets bits to zero
setsets bits
sizenumber of bits that the bitset can hold
testreturns the value of a given bit
to_stringstring representation of the bitset
to_ulongreturns an integer representation of the bitset