title: c++ ifstream Skipping Data
body: <p>I'm trying to get my program to read two lines out of a six line data file (the other four are two sets of two that are meant to be read to other objects). However, I can only get it to read one -- either the first or the second depending on how I manipulate the code.</p>
  
  <p>Here's what's in my data file:</p>
  
  <pre><code>Mustang Sally
  123.45
  George Porge
  11.99
  J. D. Rockerfeller
  56321.3
  </code></pre>
  
  <p>And here's the section of the code where I need to read said data:</p>
  
  <pre><code>void account::readAccount(ifstream &amp;inFile)
  {
      while (getline(inFile, name))
      {
          inFile.ignore();
          inFile &gt;&gt; savings;
  
      }
  
  
  }
  </code></pre>
  
  <p>The code above is only reading in the second line.</p>
  
  <p>I think I'm having a phantom newline problem, which I can't seem to resolve, but I also feel that there's another problem on top of that, which I can't comprehend with my current level of experience regarding file streams.</p>