Set

Sets all the bits or a single bit to a value.

  bitset<N>& set();
  bitset<N>& set(size_t pos, int val = 1);
  
Remarks

For the function with no parameters sets all the bits to true. For the overloaded function with just a position argument sets that bit to true. For the function with both a position and a value sets the bit at that position to the value.

Returns the altered bitset.