Ok. I made a mistake in the void function, it was actually supposed to be a bool function. My bad. But, basically, what the function should do is just run a long if statement to see if the letter is any consonant, 'a', 'e', 'i', 'o', and 'u'. Then, if it is, return true. If not, return false.
It'll look something like this:
1 2 3 4 5 6 7 8
|
bool checkVowel (char x)
{
if (x == 'a' || x == 'e' || x == 'i' || x == 'o' || x == 'u')
return true;
else
return false;
}
| |
So, as you can see, it just checks if it's either an 'a', 'e', 'i', 'o', or 'u'.
Remember to declare it before your
int main()
and then defining it afterwards. Like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
#include <iostream>
#include <cctype>
// Whatever else you need to include
bool checkVowel (char x);
int main ()
{
// Code
}
bool checkVowel (char x)
{
if (x == 'a' || x == 'e' || x == 'i' || x == 'o' || x == 'u')
return true;
else
return false;
}
| |
And it's nice to see that you have the reversing function done! Well done.
-VX