+ 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?

23rd May 2018, 5:06 PM
Ixidot
Ixidot - avatar
1 Réponse
+ 1
Try this: Int x = 10; std::bitset<32> y(x); cout << y;
23rd May 2018, 5:38 PM
Max
Max - avatar