Dear Readers,
This is what I usually do when I need to delete certain lines from a file.
Make an empty file.Copy the character one at a time from the original file to the new file. When you arrive at the character that needs to be deleted, simply skip it. Don't copy it to the new file.Finish copying the rest of the characters.Close any input/output streams associated with both the files.Delete the original file. (Yes.. delete it.)Then rename the second file (the file that was created) to the original file. There you go. Infact, some time ago I was working on a program that required this. And if any other alternatives are available please post them. I get tired of using this method all the time.