troubleshooting Question

Deleting text in a file

Avatar of jpve
jpve asked on
10 Comments1 Solution349 ViewsLast Modified:
I need to delete lines of text from an external file.  How can I go about doing this?  Each line is an instance of a 4-member struct (int, char, int, double), if that helps any.  Ideally, I would like to be able to delete a line until EOF.

Also, a question - if I have say, 5 lines, and I want to delete line 3 and after: if the program deletes all 3 lines, does it consider the whitespace to still be active, and therefore, EOF would still be where it was before the deletions?  I need to delete the remaining lines, and make the EOF marker be at the end of the last line remaining after the deletions (line 2).

BTW, I've asked 2 questions before that were answered: One by JKR, and the other by Axter - I've tried to accept their answers, but I'm getting a 500 Apache error

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 10 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros