Copying console to a text file

hey guys I was wondering if there is a way to copy the text in the command prompt into a text file without using copy and past. I know how to use fstream and in and out files just is there a easy way to just copy all info from the console when the console closes without using copy and paste. Thank you!
Topic archived. No new replies allowed.