ios_base::sync_with_stdio(false); // 缺少的话,wcout wchar_t 会漏掉中文 wcin.imbue(locale("")); wcout.imbue(locale("")); wstring s; wchar_t t[] = L"wprtinf 中文\n"; wstring u = L"wout 中文"; wprintf(t); wcin >> s; wcout << "wcin " << s << endl; wcout << u <...
// 将_setmode()删了fwrite()会输出乱码,而std::wcout会判断出错最后什么也没输出_setmode(_fileno(...