从Windows控制台应用程序打印what()
时,它可以用英语运行,但以韩文运行,例如,输出都是类似以下的问号:
"?????? ???????????????."
下面的代码是我尝试过的。
#include <iostream>
#include <windows.h>
int wmain(void)
{
try
{
throw std::system_error(ERROR_ACCESS_DENIED, std::system_category());
}
catch (const std::system_error &e)
{
std::wcout << e.what() << std::endl;
}
return(0);
}