Word wheel: Difference between revisions

m
Changed two variable names.
(New post which does not use external libraries, in addition to an existing post which uses the "Boost" library.)
m (Changed two variable names.)
Line 1,166:
}
 
for ( const std::string& wordcorrect_word : correct_words ) {
std::cout << wordcorrect_word << std::endl;
}
 
Line 1,192:
bool valid_word = true;
for ( const char& ch : word ) {
std::vector<char>::iterator iteratoriter = std::find(letters.begin(), letters.end(), ch);
int32_t index = iterator( iter == letters.end() ) ? -1 : std::distance(letters.begin(), iteratoriter);
if ( index == -1 ) {
valid_word = false;
895

edits