为什么wcout不能输出汉字呢?
aace 2003-04-01 08:49:50 #include <iostream>
std::wcout << L"This is a test ." << std::endl;
std::wstring ws1 = L"This is a test .";
std::wcout << ws1.c_str() << endl;
//
std::wcout << "测试" << std::endl;
std::wstring ws2 = L"测试";
std::wcout << ws2.c_str()<< endl;
上面两组输出语句,前一组能够正常输出;后一组不能输出。
为什么呢?为什么不能输出汉字?
谢谢!