v3 flag enabled

Find a battle-tested library for the problem you're solving right now.

Excited Cartoon Mascot Excited Cartoon Mascot
Dynamic Bitset

The dynamic_bitset class represents a set of bits. It provides accesses to the value of individual bits via an operator[] and provides all of the bitwise operators that one can apply to builtin integers, such as operator& and operator<<. The number of bits in the set is specified at runtime via a parameter to the constructor of the dynamic_bitset.

C++ 03