C++|wchar_t 简单认识
wchar_t输出用wcout。
#include <iostream>
using namespace std;
int main()
{
setlocale(LC_ALL, "chs");
wchar_t wc[] = L"中国";
wcout << wc << endl;
getchar();
return 0;
}
输出:
中国
wchar_t输出用wcout。
#include <iostream>
using namespace std;
int main()
{
setlocale(LC_ALL, "chs");
wchar_t wc[] = L"中国";
wcout << wc << endl;
getchar();
return 0;
}
输出:
中国