Getting Console with cout while using Windows subsystem

As the title of the topic, I'm using SDL and window subsystem but I need a way to also get a console with cout in case of errors or just to monitor the value of stuff.
How can I get it? :S
IDEs usually open up a console window where you can see the output. Sometimes they show the output somewhere else inside the IDE. If it doesn't show it anywhere there is probably some setting you can change. I can't say more specifically without knowing what IDE you're using.

If you don't use an IDE you could just open up a console window and start your program from there.
Last edited on
Have a look here, it works for a normal Windows app, maybe you can adapt it:
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=4971&lngWId=3
Im using Visual Studio 2015 :)
Thomas I don't know what to do with that code, I'm using SDL which as far as I know need a different declaration for main compared to the one used with Windows API, I need some simple example I can apply...even only getting some text on the output window of VS would be enough

Edit: solved
Last edited on
closed account (48T7M4Gy)
If you are creating the exe file with VS you can manage the console a couple of ways. The best way I have found is to open a console/command prompt in the .exe (Debug) folder for the project I think - search and you'll find the right place. then just type in the exe filename to execute it and all should fall into place.

Keep the command prompt console open because when you recompile just type in the exe file name again and off you go. Note also the console in this case doesn't automatically shut down so system pause etc isn't required.
The way I did it was from the project setting, From Linker/System I choose Console as Subsystem, and I get one for free every time I run the .exe, basically the same from when you create a console project on VS :)
Last edited on
Topic archived. No new replies allowed.