且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

C ++ lpcwstr转换为wstring

更新时间:2023-11-11 23:27:52

只需将 LPCWSTR 传递给 wstring 的构造函数,如下所示:

Well just pass the LPCWSTR to the constructor of wstring like this:

LPCWSTR str=L"fun";
wstring str2(str);