Hey guys, I am having a problem with a program I created. I am trying to count the number of vowels in a string and then erase said vowels and display the new string and the amount of vowels. The value I am getting from the amount of vowels is always wrong and the new string with the vowels erased doesn't display anything. Here is the code:
#include <iostream>
#include <string>
using namespace std;
string noVowels(string);
bool isA_vowel(string);
string noVowels(string)
{
string input = "";
string VowelsErased = "";
for (unsigned int i = 0; i < input.length(); i++)
{
Please enter a string: Louisa Lippmann
There are 6 vowel(s) in the string: Louisa Lippmann
The string: Louisa Lippmann, with the vowel(s) removed is: Ls Lppmnn