Plz tell me how can i delete a particular string from given file .... plz help .. I've no idea :(

Recommended Answers

All 3 Replies

you have to completly rewrite the file, omitting the string you want deleted.

just do nested loop first loop looping through file and 2nd loop checking if that string is contained within if its contained then use strstr and delete that by placing NULL at its ptr then rewrite it to other file

commented: write NULLs in the middle of a file to delete a line? Seriously?? -1
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.