This is my code, upon compiling it is showing error in type conversion when I am calling isVowel( ) function.Can you check and tell what's the error?
#include <iostream>
#include <string>
#include <typeinfo>
using namespace std;
bool isVowel(string a)
{
if(a == "a" || a =="e" || a =="i" || a =="o" ||a =="u"){
return true;
}
else
return false;
}
int main()
{
int T;
cin>>T;
for (int i = 0; i < T; i++)
{
string s, snew="";
cin>>s;
for (int j=0;j<s.length();j++)
{
if(isVowel(s[j]))
continue;
else
snew += s[j];
}
}
return 0;
}