参考出处:https://blog.csdn.net/FinalCreed/article/details/71037420
string string2hex(const string& str)
{
string temp;
stringstream ss;
string result;
for (int i = 0; i < str.size(); i++)
{
ss << hex << int(str[i]) << " ";
ss >> temp;
result += temp;
}
return result;
}
标签:string,temp,16,ss,C++,result,进制 From: https://www.cnblogs.com/leowindy/p/17242706.html