{I+=codeWee;}
[C++] WinAPI: How to Open Debug Console
////////////////////////////////
// unsafe (freopen) mode

AllocConsole();   

freopen("CONOUT$", "w", stdout);

...

printf("DEBUG CONSOLE=================\n");

...
...
FreeConsole();   






////////////////////////////
// safe (freopen_s) mode

AllocConsole();   

errno_t err;
FILE *stream;
err = freopen_s(&stream, "CONOUT$", "w+", stdout);

...

printf("DEBUG CONSOLE=================\n");

...
...
FreeConsole(); 
HTML | PHP | C++ | DirectX11 | Javascript | C# | HTML5 | ASP | SQL | General | CSS | Oculus Rift | Unity3d | Virtools SDK | Tip | NSIS | PowerShell | node.js | Web API | RTSP | All
Copyright© 2016 CodeWee.com All rights reserved.