Here is the code you can paste to get a console window in a Windows GUI'd application that starts in WinMain. There are other ways to do this, but this is the most compact snippet I have found.
AllocConsole();
freopen("conin$","r",stdin);
freopen("conout$","w",stdout);
freopen("conout$","w",stderr);
printf("Debugging Window:\n");
source
share