hex string 换转 hex2string std::stringstream R; R << std::hex << 0x1254; DWORD Str2Hex(string str){ return std::stoul(str, nullptr, 16);}