Example of text:
OUTPATIENT VISIT 4,Private,1,1,0,60,0,0
OUTPATIENT VISIT 4,Private,1,1,0,"1,260",0,0
At the moment I'm just separating the string like so:
std::stringstream ss(checkLine);
getline(ss, something, ',');
getline(ss, somethingElse, ',');
getline(ss, somethingElse1, ',');
getline(ss, somethingElse2, ',');
getline(ss, somethingElse3, ',');
getline(ss, somethingElse4, ',');
getline(ss, somethingElse5, ',');
getline(ss, somethingElse6, ',');
The way I'm doing it works for the first line of text but when it comes to the second line is goes to crap. There are a ton more lines its not only 2
I need to store each parsed section of the string onto its own string. How do I use the commas as delimiter and also deal with numbers using comma as a thousands separator?