How do I save data to a .txt file

so i have data that was printed out in a for loop

i want to put all these values into a file
There's info and code examples of writing values to files in the tutorial here that might be helpful:

http://www.cplusplus.com/doc/tutorial/files/
Topic archived. No new replies allowed.