1string s, tmp;
2stringstream ss(s);
3vector<string> words;
4
5// If there is one element (so komma) then push the whole string
6if(getline(ss, tmp, ',').fail()) {
7 words.push_back(s);
8}
9while(getline(ss, tmp, ',')){
10 words.push_back(tmp);
11}
12