Error Message

Here is my code I got it from the Daily C++ problems I am receiving an error message that says no match for call to (std::string) (std::string&) where I marked Error Line. I am just kind of doing the tutorials on this site to help me better understand c++.

void remove (string& str)
{

string vowels;


for (int i = 0; i< str.length(); i++)
{
string temp;
temp = str [i];

/* Error Line*/
if(!vowels(temp))
vowels+=str.subtr (i,1);
}
cout<<str<<" with no vowels become: "<< vowels<<endl;
}
Look at vowels(temp)

vowels is just a string but you're trying to use it like a function call.
I am really new to c++ and I am not sure I understand can you explain it in further detail for me?
I got it now!!! It was so clear once I took a break and came back to it thanks for the help!!!!
Topic archived. No new replies allowed.