📜  将 ascii char 值转换为十六进制 c++ 代码示例

📅  最后修改于: 2022-03-11 14:44:56.994000             🧑  作者: Mango

代码示例1
#include 
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