cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
how to Swap Data In Between txt File
how to Swap Data In Between txt File
Sep 6, 2014 at 12:10pm UTC
raminlich
(25)
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
Sep 6, 2014 at 12:37pm UTC
AbsoluTe 88
(16)
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.