Redirecting Output to File in Visual C++

Warning! Some information on this page is older than 5 years now. I keep it for reference, but it probably doesn't reflect my current knowledge and beliefs.

# Redirecting Output to File in Visual C++

Mon
16
Apr 2012

If you write a console program in C++ that prints
 a lot of text to the standard output, sometimes watching these few newest line that appear in the black system console is not enough. When running the program from command line, you can redirect its output to a text file with syntax like > Output.txt.

What about launching program from Microsoft Visual Studio / Visual C++ Express? Can you redirect console output to file from there? There is no field for it in project properties, but it actually works when you just append the redirect symbol to Command Arguments field, like this:

Comments | #c++ #visual studio Share

Comments

STAT NO AD
[Stat] [STAT NO AD] [Download] [Dropbox] [pub] [Mirror] [Privacy policy]
Copyright © 2004-2019