12345678
// get each line from the file while ( getline(inf,line) ) { istringstream is(line); string s; // get each comma field from the line while ( getline(is,s,',') ) { } }
123456
vector<string> fields; // get each comma field from the line while ( getline(is,s,',') ) { fields.push_back(s); } spreadsheet.push_back(fields);