版权声明:Copyright (c) 2018 初阳-.-#.Co.Ltd. All rights reserved. https://blog.csdn.net/xwh012510/article/details/86479363
void openTheConsole() //打印窗口
{
AllocConsole();
FILE *stream;
freopen_s(&stream, "CONOUT$", "w+t", stdout);
freopen_s(&stream, "CONIN$", "r+t", stdin);
}
析构时使用FreeConsole(),否则会造成内存泄漏。