#include <io.h>
#include <fcntl.h>

#include <stdio.h>

 

void InitConsoleWindow()
{
int nCrt = 0;
FILE* fp;
AllocConsole();
nCrt = _open_osfhandle((long)GetStdHandle(STD_OUTPUT_HANDLE), _O_TEXT);
fp = _fdopen(nCrt, "w");
*stdout = *fp;
setvbuf(stdout, NULL, _IONBF, 0);
}

 

在主程序初始化的地方加入上面了函数

相关文章:

  • 2021-06-24
  • 2021-09-25
  • 2022-02-28
  • 2021-08-04
  • 2021-09-13
  • 2021-11-01
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-17
  • 2021-08-19
  • 2022-12-23
  • 2022-12-23
  • 2021-08-06
  • 2021-06-09
  • 2022-03-08
相关资源
相似解决方案