Groovy hepcat John Baker was jivin' on Thu, 13 Apr 2000 13:51:18 +1000
in comp.lang.c.
Editing a text file's a cool scene! Dig it!
Quote:
>After using fgetpos to store the location of a line of text in a file, I
>then used fsetpos to return to that line of text. I now want to
>overwrite this line with a new line of text. How do I do it?
Well, you can't. At least, you can't portably. You'll have to copy
the file to a new file up to the line you want to replace, write the
new line, then copy the rest of the file. After that, remove the
original file and rename to new one to the original's name.
--
----- Dig the EVEN NEWER, MORE IMPROVED news sig!! -----
-------------- Shaggy was here! ---------------
http://aardvark.apana.org.au/~phaywood/
============= Ain't I'm a dawg!! ==============