for an assignment I wrote a program and we hit start without debugging to use the program and the console would ask questions and such. As part of this assignment, we have to write everything that appears in the console window (in visual studio, when we hit start without debugging or ctrl+f5) to a .txt file. Is there a way to have every cout statement write to this file or do I have to type it out on every line that i want to be written to the .txt?
using the ofstream with #include fstream for this by the way