Concatenation of LPWSTR strings

后端 未结 3 1811
梦谈多话
梦谈多话 2020-12-18 22:52

In Visual C++, I have a

LPWSTR mystring;

which is already defined somewhere else in the code.

I want to create a new LPWSTR contain

3条回答
  •  独厮守ぢ
    2020-12-18 23:32

    The C++ way:

    std::wstring mywstring(mystring);
    std::wstring concatted_stdstr = L"hello " + mywstring + L" blah";
    LPCWSTR concatted = concatted_stdstr.c_str();
    

提交回复
热议问题