title: C++ string parsing (python style)
body: <p>I love how in python I can do something like:</p>
  
  <pre><code>points = []
  for line in open("data.txt"):
      a,b,c = map(float, line.split(','))
      points += [(a,b,c)]
  </code></pre>
  
  <p>Basically it's reading a list of lines where each one represents a point in 3D space, the point is represented as three numbers separated by commas</p>
  
  <p>How can this be done in C++ without too much headache?</p>
  
  <p>Performance is not very important, this parsing only happens one time, so simplicity is more important.</p>
  
  <p>P.S. I know it sounds like a newbie question, but believe me I've written a lexer in D (pretty much like C++) which involves reading some text char by char and recognizing tokens,<br>
  it's just that, coming back to C++ after a long period of python, just makes me not wanna waste my time on such things.</p>