binary files update in C++ -
I am new in binary files, my binary file is written in length indicators and I want to know what the way Can I update it (write it) without writing it (writing it)? And how can it be removed (removing backwards with shifting)?
You can not do this If you want to delete a part of the data in your file, then you have to rewrite the rest of the file.
Pseudo-code:
- Open original file to read - Open temp file for writing - Data in original file - if original file data is required - data is temporary file Type - Delete original file - Rename temporary file to original file name
Comments
Post a Comment