Delete a part of a file?
<p>I have want to code a program that functions to open a file and if I find "Hello World", the program will automatically copy the text before "Hello World" in to a new file.</p>

<p>The problem is, how could I delete the text 'hello world' in the 'buffer', for example : </p>

<pre><code>  buffer = new char [Size];

  ifstream fstr;

  fstr.open(path, ios::in);

  fstr.read(buffer, (Size));

  fstr.close();

  //what should i write here about copying the rest of the text except 

  //Hello World? 

  ofstream outputFile(path2, ios::out);

  outputFile &lt;&lt; buffer;

  outputFile.close();
</code></pre>

<p>Thank you for helping me :) Btw I'm using Borland C++ and I'm a learner.</p>
