Standard C++ Library User Guide and Tutorial
Manuals
Brands
HP Manuals
Server
HP NonStop G-Series
91
92
93
94
95
96
97
98
99
100
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]);
}
}
1
...
...
90
91
92
93
94
...
...
250