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、

 

posted @ 2018-01-04 20:49  CppSkill  阅读(188)  评论(0编辑  收藏  举报