how to Swap Data In Between txt File

hi all
For Example We Have 2 txt file with these Data:
First File:
Orange
Milk
Second File:
Soda
banana


I Want To Know Is there Any Class To Swap Hello and Hi To be Like This?
First File:
Soda
banana
Second File:
Orange
Milk
I'm assuming that you have learned about input and output streams via fstream.

For your question, all you would have to do is open both files and then output the data to the opposite files. Don't forget to close files once you are done using them.

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