struggling at using erase()

-
Last edited on
erase() is going to get rid of a letter, yes? So when you find a letter in the string that isVowel(), then you just erase() it from the string and once you’ve searched the entire string, you just return the string.
Also here’s some documentation on erase()
http://cplusplus.com/reference/string/string/erase/
so... like this?
1
2
3
4
5
6
string removeVowels(const string& input)
{
    string input;

    erase(isVowel(input))
}
no, not like that
at least respect the prototypes


let's simplify
make a function that says (output to screen) for each character of a string, if it is or not a vowel.
Topic archived. No new replies allowed.