I need a std::bitset<64>
for my project. But while printing the number something goes wrong:
unsigned long long var = 18446462598732906495ULL;
std::cout << std::bitset<64>(var) << std::endl;
it prints:
0000000000000000000000000000000000000000000000001111111111111111
I would expect it to print:
1111111111111111000000000000000000000000000000001111111111111111
What is going wrong?
I'm working with DevC++ in 64-bit machine.