Quick Vector reading problem

For a class assignment, I've been trying to make a program which organizes some info about hockey players into vectors and then calculates averages. However, the information off of the .txt file has to seperate things using commas and quotations like such:

"Steve Downie ","5' 11""",191,04/03/87,25,"Newmarket, ON, CAN"

Going by name, height, weight, birthdate, age, birthplace. How can I seperate each peice of information into its own seperate vector without accidentally reading in something that shouldn't be in there?

Any help is greatly welcomed, thank you!
Go through the string character by character and keep track of whether you're inside a quoted string or not. Whenever there's a comma and you're not in a string, start a new substring.
Topic archived. No new replies allowed.