Hi
I have a text file containing one string on each line. My problem is I want to surgically remove just one line (or one string - same thing) without leaving a blank line.
ie, if I had the following lines in my text file:
thisisline1
thisisline2
thisisline3
thisisline4
I would like to get rid of, say, line 3, leaving:
thisisline1
thisisline2
thisisline4
I'm sure there must be an easy way to do this - a function hidden somewhere or something?! As far as I can tell, fscanf and fgets etc. can only copy the text, not 'cut' or remove it. I have scoured the man pages and searched the net and come up blank.
If anyone could shed some light on this for me, it would be much appreciated.
Thanks.