How do you delete data from an external file from within your program? I am using arrays to store names and phone numbers and saving them to an external file. I need to be able to delete data from the same external file.
How do you delete data from an external file from within your program? I am using arrays to store names and phone numbers and saving them to an external file. I need to be able to delete data from the same external file.
There are no methods to delete or remove bytes in the middle of a file. You can replace existing bytes with new ones. For example: "123" => "1A3". If you want to do something like "123" => "13", you have to copy the file, ommitting the part you want to "delete". This goes the same for inserting data.
If you don't want to copy the file to delete, you can "mark" the record as deleted.
gg