1.

#ifdef CONSOLE

    AllocConsole();   
    SetConsoleTitle(_T("Debug Console"));
    freopen("conin$", "r+t", stdin);   
    freopen("conout$", "w+t", stdout);   
    freopen("conout$", "w+t", stderr);   
#endif

...........................................................

#ifdef CONSOLE
    fclose(stderr);   
    fclose(stdout);   
    fclose(stdin);   
    FreeConsole();   
#endif


 

 

2.Post-Build Command Line

editbin /SUBSYSTEM:CONSOLE $(OutDir)\$(ProjectName).exe 

相关文章:

  • 2022-01-07
  • 2021-11-08
  • 2022-12-23
  • 2022-12-23
  • 2021-09-05
  • 2021-11-23
  • 2021-10-29
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-06
  • 2021-09-29
  • 2021-05-08
  • 2021-09-19
  • 2021-06-22
相关资源
相似解决方案