I get this error for the following code:
Error C2398 Element '1': conversion from 'int' to 'unsigned __int64' requires a narrowing conversion 9
1 2 3 4 5 6 7 8 9 10 11 12 13
|
#include <iostream>
#include <bitset>
int main()
{
for (int i; std::cin >> i;)
std::cout << std::dec << i << " == "
<< std::hex << " 0x " << i << " == "
<< std::bitset < 8 * sizeof(int)>{ i } << '\n';
system("pause");
return 0;
}
|
Last edited on