How to print (using cout) a number in binary form?
The easiest way is probably to create an std::bitset representing the value, then stream that to cout.
The easiest way is probably to create an std::bitset representing the value, then stream that to cout.