Farid S
0
Q:

convert ascii char value to hexadecimal c++

#include <sstream>
std::stringstream sstream;
sstream << std::hex << (my_char - 0);
std::string result = sstream.str(); 
// result = hexadecimal string value of the ascii value of my_char
0

New to Communities?

Join the community