VC_窗口exe_printf信息

1、

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

2、

void InitConsoleWindow()
{
    AllocConsole();
    HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
    int hCrt = _open_osfhandle((long)handle,_O_TEXT);
    FILE * hf = _fdopen( hCrt, "w" );
    *stdout = *hf;
}

3、

4、

5、

原文地址:https://www.cnblogs.com/cppskill/p/8195891.html