ifstream and ofstream - EOF while loop

I've been confused on how to use ifstream an ofstream correctly. I'm not completely sure how to write a program that reads the first row of a text file and than reads the second row of text and so on, using ifstream, and how I'd use ofstream to display the calculated results after whatever is read from the text file to display on another text folder with those results.

Any advice or examples so I can get an idea of how to use fstream and eof loop properly.

Take a look at this tutorial:
http://www.cplusplus.com/doc/tutorial/files/
Topic archived. No new replies allowed.