#include <iostream>
#include <string>
using namespace std;
int main ()
{
string stringone;
cout << "put in the stinking sentence mofo" << endl;
getline (cin,stringone);
string string1;
string1.assign(stringone);
for (int q=0;q > stringone.length();q++)
{
switch (stringone[q])
{
case 'a':
string1.replace(q,q+1," ");
break;
case 'e':
string1.replace(q,q+1," ");
break;
case 'i':
string1.replace(q,q+1," ");
break;
case 'o':
string1.replace(q,q+1," ");
break;
case 'u':
string1.replace(q,q+1," ");
break;
}
}
cout << stringone << " is " << string1 << endl;
return 0;
}
ah yeah i messed with erase and a few other string functions, im just trying to remove the vowels in any way at the moment after this have you got anygood ideas to practice??

New Topic/Question
Reply




MultiQuote








|