+ 1
Dec to bin
If i can write ~~~ int a = 255; cout << hex << a; Output: ff ~~~ or ~~~ cout << oct << 14; Output: 20 ~~~ Is it possible to convert dec to bin like this?
1 Réponse
+ 1
Try this:
Int x = 10;
std::bitset<32> y(x);
cout << y;
If i can write ~~~ int a = 255; cout << hex << a; Output: ff ~~~ or ~~~ cout << oct << 14; Output: 20 ~~~ Is it possible to convert dec to bin like this?