C++ std::string和std::wstring转换方法
必须设定locale。否则出错 代码是42#include #include using namespace std;string ws2s(const wstring& ws){string curLocale = setlocale(LC_ALL, NULL); // curLocale = "C";setlocale(LC_ALL, "chs"); const wchar_t* _Source = ws.c_str();size_t _Dsi