Viewing stdout/stderr in Visual C++
Hi,
I'm working on a cross platform game (using SDL) with some folks, and the standard for reporting errors on the project is to use cout/cerr... This works fine when I'm working in Linux, but I do most of my work in Windows, and the problem is that when you use cout/cerr in Windows they don't do anything since there's no "console" per se, it's just a window.
So, does anyone know if there's some option to bring up a console inside Visual Studio or something? It'd be much easier than having to write some kind of logging function which has an ifdef for WIN32 which uses OutputDebugString() on windows and cout for everything else, and then telling all my teammates to change their code to use it...
Thanks very much!
roos
You can compile SDL applications as console applications, and you'll get a console window that stdout/stderr should output to.
SDL redirects stdout and stderr (which are output to by cout/cerr) to stdout.txt and stderr.txt of the current working directory by default on windows IIRC.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement