标签: c++ hex
如何在C ++中将整数转换为十六进制std :: wstring?
答案 0 :(得分:8)
与窄字符串相同:
#include <iomanip> #include <sstream> //... std::wostringstream oss; // note the 'w' oss << std::hex << n; return oss.str(); // type is std::wstring