I created an Empty Project in Visual C++, but now I need the Console to display debug output.
How can I enable the Console without recreating the project or show the output in the VS output window?
Thanks in advance Attic
I created an Empty Project in Visual C++, but now I need the Console to display debug output.
How can I enable the Console without recreating the project or show the output in the VS output window?
Thanks in advance Attic
You can always call AllocConsole in code to create a console for your application, and attach it to the process. FreeConsole will remove the console, detaching the process from it, as well.
If you want all standard output stream data to go to the console, you need to also use SetStdHandle to redirect the output appropriately. Here is a page showing working code to do this full process, including allocating the console and redirecting the output.
Does this help?
http://msdn.microsoft.com/en-us/library/ms682499%28VS.85%29.aspx