Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

std::cout << std::setw(20) << setfill('=') << '=';

Bit operations

Check if the n-th bit is on: if( m_print_bits & (1 << n) ) ...

Set n-th bit: mask |=  (1 << n)

Clear n-th bit: bit_fld &= ~(1 << n)

Toggle n-th bit: bit_fld ^= (1 << n)

Check if the element is in the vector or list

...