title: C++ reading from a multi-type csv file
body: <p>I'm trying to use C++ to read from a file, which is structured like this:</p>
  
  <pre><code>frank, 80, 90
  johnny, 10, 25
  ...
  </code></pre>
  
  <p>I made a loop to go through each line of the file, but every time I read the name string, the comma is included with the name (so instead of <code>frank</code> I get <code>frank,</code>).</p>
  
  <p>My code in question is:</p>
  
  <pre><code>// var declarations
  ifstream streamVar;
  string name;
  int num1, num2;
  
  // there is a chunk of code that opens file and does error checking here
  
  // this is the code that I'm having trouble with
  streamVar &gt;&gt; name;
  streamVar &gt;&gt; num1;
  streamVar.ignore(100, ',');
  streamVar &gt;&gt; num2;
  </code></pre>
  
  <p>How can I read these three values while ignoring the commas?</p>