Answers for "c++ pwstr to char*"

C++
0

c++ pwstr to char*

PWSTR myPwstr;

std::wstring_convert<std::codecvt_utf8<wchar_t>, wchar_t> convert;
std::string stringified = convert.to_bytes(myPwstr);

const char* result = stringified.cstr();
Posted by: Guest on August-23-2021

Browse Popular Code Answers by Language