title: C++ - Read in file lines separated by a comma
body: <p>I tried looking up what I'm trying to do but I cant find specifically what I'm trying to do. I have a text file with multiple lines that look like this:</p>
  
  <pre><code>12345,12345,12.34,12345,12345
  </code></pre>
  
  <p>It's the same format on every line and I want to get each line and plug the numbers into certain variables. Something like this:</p>
  
  <pre><code>file &gt;&gt; int1 &gt;&gt; int2 &gt;&gt; double1 &gt;&gt; int3 &gt;&gt; int4;
  </code></pre>
  
  <p>But this is very hard for me to do because of the comma separating each number. I used to be able to do this when there was a 'space' but the comma is really throwing me off. Any ideas?</p>