簡體   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