Friday, July 31, 2009

Is there a function in c to remove some lines from a text file?

* open up an infile and outfile with fopen()





* set up a loop to read each line using a function like fgets()





* make a decision about that line (keep it or kill it)





* write each 'keep it' line to the output file with fprintf()


No comments:

Post a Comment