jeudi 26 mars 2015

Parse string of words into set of words


Here is the function I am writing to parse a string of words into a set of words.


std::set parseStringToWords(string rawWord) {


getline(cin,rawWord);



istringstream iss(rawWord);
string word;
while(iss >> word) {

}


}


I'm pretty sure what I have is right so far, but I'm not sure what to do in the while loop. Any hints?




Aucun commentaire:

Enregistrer un commentaire