whcar_tの扱いと表示

// 文字リテラル
#include 
#include 

using namespace std;

int main(void)
{
	char ch;
	wchar_t wd;
	
	locale::global(locale("japanese"));

	ch = 'A';
	wd = L'漢';

	cout << ch << endl;
	wcout << wd << endl;

	return 0;
}

出力結果
A
漢

// 文字列リテラル
#include 
#include 

using namespace std;

int main(void)
{
	locale::global(locale("japanese"));

	char ss[10] = "ABCDE";
	wchar_t ws[10] = L"wide文字列です";

	cout << ss << endl;
	wcout << ws << endl;

	return 0;
}

出力結果
ABCDE
wide文字列です