我想在 C++ (VS 2010) 中将 LPCWSTR 转换为 wstring。 我想在 OutputDebugStringW() 中使用它。
谢谢。
最佳答案
我们只需将 LPCWSTR
传递给 wstring
的构造函数,如下所示:
LPCWSTR str=L"fun";
wstring str2(str);
关于C++ lpcwstr 到 wstring,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15743838/