Вопрос

I would like to convert a LPCWSTR to wstring in C++ (VS 2010). I want to use this in OutputDebugStringW().

Thank you.

Это было полезно?

Решение

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

LPCWSTR str=L"fun";
wstring str2(str);
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top