64,648
社区成员
发帖
与我相关
我的任务
分享
#include <iostream>
using namespace std;
int main()
{
wstring wstr = L"中国人";
wchar_t w = wstr[0];
char buf[12] = {0};
setlocale(LC_ALL, ".936");
wctomb(buf, w);
cout<<buf<<endl;
return 0;
}