Delete data from a file

Hello, im making an schedule and im saving the data in a .dat file. All the data are contacts wrote from an struct and i want to delete a contact from the file by watching for it by entering the name. I can find the data to delete but i do not know how to remove it from the file, how could i replace the whole contact for nothing or deleting it?
Last edited on
What kind of file is it? A text file? Very rigid binary file?

In general: You can't simply remove data from the middle of a file. You have to re-write the file with the information removed.
Topic archived. No new replies allowed.