c++ delete one record from 100k records in a file and update source file [closed]

I store 100k records in a file, but I want to delete only one record. its easy to delete one record out of 10 records, we can delete and updated it rest of 9 records to source file, but if we delete one record out of 100k records and update source is very time consuming. please let me know easy method to do the same.

from c++ programming language.

  • Use a database?

    – 

  • You can have a “deleted” flag in each record, and only update that part. Then ignore such records when reading the file.

    – 

  • 1

    Note that “lakh” is only used in Indian English, many English speakers will not know what it means.

    – 

Leave a Comment