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;
}

输出:

中国
posted @ 2021-09-28 17:27  double64  阅读(225)  评论(0)    收藏  举报