Sorry for the chronic name.
I have a project that I am working on and I would appreciate any suggestions as to how I should do IO stuff.
Ok, I have 3 text files. One file contains many lines of text. This is the same for the other two files. Let them be called File1, File2, and File3.
I need to create a text file, for explanation, I will call it Result.txt.
Here's what you need to do:
- Extract the first line of text from File1 and add it to Result.txt.
Extract the first line of text from File2 and add it to the end of the first line in Result.txt.
Extract the first line of text from File3 and add it to the end of the first line in Result.txt.
Create a new line in Result.txt
Repeat from 1 to 4.
Note. These files can be quite large.
Anyone have any ideas on how best to approach this?
thanks
-
Thank you all for your very helpful answers. I learned a lot from your tips and code samples!
source
share