Does anyone know how and if is possible to convert an int to a hexadecimal
This is a discussion on Conversion within the C++ Programming forums, part of the General Programming Boards category; Does anyone know how and if is possible to convert an int to a hexadecimal...
Does anyone know how and if is possible to convert an int to a hexadecimal
Yes, it is.
-Govtcheez
govtcheez03@hotmail.com
you can print it out by using %x instead of %d
Another way is use the function itoa() in <stdlib.h>.
Or if you just want to print an int in hexadecimal:
int i = 255;
cout << i << " hex:" << hex << i << endl;