beautypg.com

HP Integrity NonStop H-Series User Manual

Page 92

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]);
}
}

This manual is related to the following products: