dimanche 6 octobre 2019

How do you get words from a text file that are of length 9?

I was wondering how you can go through a text file and get all the words in that text file that are of length 9 and then select any one of those words and randomize those letters.

book = readWordsFile("misc/word.txt");
std::vector<std::string> text;
for(int i = 0; i<book.size();i++){
if(book[i] == 9) {

return book[i];
}
}

Aucun commentaire:

Enregistrer un commentaire