繁体   English   中英

如何在C ++中将整数转换为十六进制的wstring

[英]How to convert integer into hexadecimal wstring in C++

如何在C ++中将整数转换为十六进制std :: wstring?

与窄字符串相同:

#include <iomanip>
#include <sstream>

//...

std::wostringstream oss;  // note the 'w'
oss << std::hex << n;

return oss.str();         // type is std::wstring

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM