HP Integrity NonStop H-Series User Manual

Page 92

Advertising
background image

void findMisspell(stringset & words, string & word)
{
for (int i = 1; i < word.length(); i++) {
swap(word[i-1], word[i]);
if (words.count(word))
cout << "Suggestion: " << word << endl;
// put word back as before
swap(word[i-1], word[i]);
}
}

Advertising
This manual is related to the following products: