title: Why does 'new line' offset the all the characters byte position in a .txt file +1?
body: <p>When I use <code>fstream::tellg</code>, after reading in the first character with <code>fstream::get (char)</code> the result is: 1</p>
  
  <p>I then insert a 'new line' after the first character </p>
  
  <p>I <code>fstream::seekg</code> to the beginning: 0</p>
  
  <p>When I use <code>fstream::tellg</code>, after reading in the first character this time 
  the result is: 2  </p>
  
  <p>If I insert: <code>"abc"</code>, into a .txt file:</p>
  
  <ul>
  <li>after reading "a" <code>tellg</code> will give: 1</li>
  <li>after "b" 2 </li>
  <li>and after "c" 3.</li>
  </ul>
  
  <p>But if I insert: <code>"abc\n"</code> or <code>"abc" &lt;&lt; endl;</code>:</p>
  
  <ul>
  <li>after reading "a" <code>tellg</code> will give 2</li>
  <li>after "b" 3</li>
  <li>after "c" 4</li>
  <li>lastly 5 after the new line. </li>
  </ul>
  
  <p>What is the reason for this? </p>
  
  <p>I understand that 'newline' is characters too. What I do not understand is the offsetting of the <code>tellg</code> result after reading a character. With each use of  'newline' this offset is incremented by one.</p>
  
  <h2>Update</h2>
  
  <ul>
  <li><strong>Conclusion:</strong>
  There was a problem with my IDE setup! <strong>I have been using Code::Blocks</strong>. I tried <strong>building the program in Microsoft Visual Studio IDE</strong> and <strong>it ran with no trace of the problem</strong>. This does not mean that Code::Blocks is broken. It might have been an issue in my Code::Blocks settings. I have no recollection of changing anything. Even if that was the case; I, in my humble opinion, do not think it is right that you can change this sort of thing by accident. I am disappointed in Code::Blocks.                       </li>
  <li><strong>mySolution:</strong> Change IDE</li>
  </ul>