以前处理的都是字符型数据,宽字符处理按照原来的方法做就出现问题。现在将宽字符的输入输出代码给出,供大家参考。
#include<iostream>
#include<vector>
using namespace std;
int main()
{
locale&loc = locale::global(locale(locale(), "", LC_CTYPE));
wchar_t temp;
wcin >> temp;
wcout << temp;
system("pause");
return 0;
}