Wednesday, October 1, 2014

A simple way to get wchar_t from std::string

int outputDebugString(const char *text)
{
    std::string textA = text;
    std::wstring textW = std::wstring(textA.begin(), textA.end());
    ::OutputDebugStringW(textW.c_str());
}

No comments:

Post a Comment