There is no need for additional variables.
#include <iostream>
#include <string>
#include <cctype>
using namespace std;
bool isVowel(const char symbol)
{
return (string("aeiou").find(tolower(symbol)) != string::npos);
}
bool containsVowel(const string text)
{
return ((text.length() > 0) && (isVowel(text[0]) || containsVowel(text.substr(1))));
}
int main()
{
// Stuff with containsVowel..
return 0;
}