bool, not working
Hi, I get this error and warning
error: no match for 'operator!' in '!vast'
note: candidate is: operator!(bool) <built-in>
In my bool function which is.
bool tyhjarivi(string vast)
{
string::size_type i=0;
while(vast.size()!=0)
{
if( !isspace(vast.at(i)) && !vast=="")
{
return false;
}
vast.erase(i);
}
return true;
}
|
Anyone?
The compiler thinks you're doing (!vast)==""
What you want to do is this: vast!=""
Topic archived. No new replies allowed.