title: Writing to specific position in a file
body: <p>I have</p>
  
  <pre><code>fstream output;
  output.open(fname, ios::out | ios::trunc); //file
  for (int i=0; i&lt;flength; i++)
      output.put('1');
  </code></pre>
  
  <p>I want to overwrite different length of data to different locations in the file. Data is characters.</p>
  
  <p>Lets say there is <code>111111111111111111111111111111111</code>, I want to write </p>
  
  <pre><code>11   111111333111!!!!!!1    11441111
  </code></pre>