Trying to Manipulate then display a user-inputted c-string.

I'm writing a password suggestion program(win32). So what I need to do is first take a user inputted c-string, then manipulate it to exchange certain vowels with numbers, then display this new password. I would also like to count and display the number of characters and display the password length to the user. I have the vowels I would like to change set up in arrays (note I want u to change to 7). I have been told that I could go through the string in a loop and replace each vowel with a number, but I'm not exactly sure how to do that.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
  const int MIN_PASSWORD_SIZE = 8;
	
	int numVowels[5];
	numVowels[0] = 4;
	numVowels[1] = 3;
	numVowels[2] = 1;
	numVowels[3] = 0;
	numVowels[4] = 7;

	char vowels[10];
	vowels[0] = 'A';
	vowels[1] = 'a';
	vowels[2] = 'E';
	vowels[3] = 'e';
	vowels[4] = 'I';
	vowels[5] = 'i';
	vowels[6] = 'O';
	vowels[7] = 'o';
	vowels[8] = 'U';
	vowels[9] = 'u';


	char userPassword[13];

	// Promts the user to enter a password
	cout << "Welcome! Please insert a password.\n The password must be between 8-12 characters long.\n";
	cin >> setw(13) >> userPassword;
Topic archived. No new replies allowed.