Possible Duplicate:
Splitting a string in C++
I am trying to read data from file where each line has 15 fields separated by commas and spaces. The data are not of a single type. Currently what I am doing is reading data line by line, and pass each line to an istringstream and between each read I do the following:
ins.ignore(25,','); //ins is the istringstream
I however don't like my method and would like a cleaner one. What would be a better way of doing it?. Also I would only like to use stl and no external libraries. Basically what I want is to tokenize each line using the comma as the delimiter.