delete specific content

Hello all

I'm new to c++ and trying to develop a program that can delete some specific content from the given file.

Is It possible, if yes, then just provide me with little logical detail, I would like to develop the code myself

Thanks in advance
Because a file is already saved, you cant actually remove part of it.

What you can do is programmatically copy the file and leave out the bit you want to remove, resulting in a shorter file. This involves reading the file into your C++ program and then saving the bits you want to save.

if you can hold the entire file in memory you could resave to the original filename, otherwise you will need to save to a new temporary file, then delete the old file and rename the new one.
thank you Jaybob66

it is solved :)
Topic archived. No new replies allowed.