Getting values from comma separated string?

I have a string which has values separated by commas and I need to retrieve one value at a time. The string looks like "1,2,3,4,5,6,7," and I want to get just the number, not the comma or any white space.

Any ideas?

Thanks
You could use string::find() to find the first comma, then substr() to get a substring up to that point. Read/remove it, then repeat.
Topic archived. No new replies allowed.