How to delete parts from a binary file in C++

前端 未结 3 1843
一生所求
一生所求 2021-01-24 01:02

I would like to delete parts from a binary file, using C++. The binary file is about about 5-10 MB.

What I would like to do:

  1. Search for a ANSI string \"so
3条回答
  •  猫巷女王i
    2021-01-24 01:20

    There are a number of fast string search routines that perform much better than testing each and every character. For example, when trying to find "something", only every 9th character needs to be tested.

    Here's an example I wrote for an earlier question: code review: finding tag reverse search on a non-null terminated char str

提交回复
热议问题