[C++] std::string ↔ std::wstring std::string str; std::wstring wstr; // string → wstring wstr.assign(str.begin(), str.end()); // wstring → string str.assign(wstr.begin(), wstr.end()); Program Language/C & C++ 2021.06.09