im getting the message that you see in the title, and i don't know why.
I have a Class called ChainedList that has a method called Next:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
template <class T>
bool ChainedList<T>::Next()
{
if (Pointer->Next != 0)
{
//This part is not really important now
Pointer = Pointer->Next;
Element = Pointer->Data;
//
returntrue;
}
elsereturnfalse;
}
I'm using this method in my main function like this:
When the function takes no parameters you can't leave out the parentheses. I think some implementations let you do that, but it's not standard. What the error is saying is that the compiler can't implicitly convert a pointer to function to a bool.