C++ STRING 和WSTRING 之间的互相转换函数
<br />#include <string><br />std::string ws2s(const std::wstring& ws)<br />{<br /> std::string curLocale = setlocale(LC_ALL, NULL); // curLocale = "C";<br /> setlocale(LC_ALL, "chs");<br /> const wchar_t* _Source = ws.c_str();<br /> size
转载
2010-12-07 17:33:00 ·
744 阅读 ·
0 评论