Vowel remove

I Have to make a program that will remove all the vocals from a string characters,And I have no idea from where to start,could someone give some ideas?
Last edited on
How you can find them you can read here:
http://www.cplusplus.com/forum/beginner/16883/

And to remove them, you can use erase:
http://www.cplusplus.com/reference/string/string/erase/
I hope this is what you want, I made the program for you. Cheers.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <iostream>
using namespace std;

int main() {
	char *text;
	text = new char[];

	cout << "Insert the string" << endl;
	cin >> text;

	for (int i=0;text[i]!='\0';i++) {
		if (text[i]=='a' || text[i]=='e' || text[i]=='i' || text[i]=='o' || text[i]=='u' || text[i]=='A' || text[i]=='E' || text[i]=='I' || text[i]=='O' || text[i]=='U') {
			text[i]=' ';
		}
	}
	cout << text;
return 0;
}
yes this should work, but just if you wonna replace them with a blank and don't wan't to remove them.

kibestars way:
"ThisIsATest!" => "Th s s T st!"


like I understood the question:
"ThisIsATest!" => "ThssTst!!"
Topic archived. No new replies allowed.