Here's the code I'm trying to change
string binary = "000000100001000100010000000100000" bitset<32> set(binary); cout << hex << set.to_ulong() << endl;
The code shows 2112010 but I want it to show 02112010.
that is the same number you can format it with the 0 by using format specifiers if you need to retain the zero you need to store it as a string,
std::cout << std::setfill('0') << std::setw(5) << i << std::endl;
that is the same number you can format it with the 0 by using format specifiers if you need to retain the zero you need to store it as a string,