0
How do I do the following?
insert a single character in between characters, delete a single character from a word and replace a character in a word with another character? int Spellchecks(string W); bool Swap(string W); bool Insert(string W); void SpellCheck(); void Delete(); void Replace(); For instance bool Swap ::spellchecker(string W) { DON'T KNOW WHAT TO PUT IN HERE } The same goes for the other ones.
1 Answer
+ 3
Check out string reference:
http://en.cppreference.com/w/cpp/string/basic_string
You might wanna focus on these methods:
http://en.cppreference.com/w/cpp/string/basic_string/insert
http://en.cppreference.com/w/cpp/string/basic_string/erase
http://en.cppreference.com/w/cpp/string/basic_string/replace
Happy trying, and best of luck : )
Hth, cmiiw