Reading lines of text file
Posted on 2004-11-30
I want to do someting odd with text files. I have a text file whose contents are lines like the ones below:
I want to read these lines from a text file, add lines 2, 3 and line 4 if line one contains a certain number like 1000 or if line2 has some number say 202, it should add lines 1 to line 16. The list in the text file is very long that putting it in an array would take so much memory.
How can i possibly do this?