包含#include<io.h>
在程序中加入如下几行
#ifndef DEBUG_TRUE
#define DEBUG_TRUE
AllocConsole();
stdout->_file = _open_osfhandle((intptr_t)GetStdHandle(STD_OUTPUT_HANDLE), 0);
printf("Enter WinMain and Create Console\n");
#endif
之后就可以在程序中使用I/O函数来打印调试信息了。
转载于:https://blog.51cto.com/gamer/1215078