opening a file

i understand that you can use c++ to open a file to read, but when you output in a file can you then make the program put the output in the file and open the file in a window. i use visual studio.
Just cout the data you are getting...

1
2
3
4
5
//psuedocode
while(file isn't end) {
getline(data)
cout<<data
} 
Yea you can do something like what firedraco says to output data to an external file. Have to use fstreams
Topic archived. No new replies allowed.