Writing to a file more efficently.
Posted on 1998-06-02
I'm writing to a file but find the method I'm using is in-efficent. What I do is read in a file, store it in a array, modify the corressponding array element to the line number and then print everything back to the file. Is there a simplier way to just write a single line to a file? So if I wanted to just write line 2 over in a 5 line file, I wouldn't have to touch any other lines.
Thanks in Advance.