C++ string parsing (python style)
问题 I love how in python I can do something like: points = [] for line in open("data.txt"): a,b,c = map(float, line.split(',')) points += [(a,b,c)] 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 How can this be done in C++ without too much headache? Performance is not very important, this parsing only happens one time, so simplicity is more important. P.S. I know it sounds like a newbie question,