Hex in c++ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Hex in c++

In c++, what is hex when it is used as follows: cout >> hex >> variable; How does it work?

8th May 2019, 3:24 AM
Pikachu
Pikachu - avatar
1 Answer
+ 7
You mean cout << hex << variable? https://code.sololearn.com/cPMDa057gisB/?ref=app It converts the output from decimal to hexadecimal format.
8th May 2019, 3:56 AM
Sonic
Sonic - avatar