Would anybody know why I get this error saying that conditional expression of type 'studentType' is illegal?
This part is coming from my orderedLinkList header
Here is the code piece where it says its illegal.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
bool orderedLinkedList<Type>::search(const Type& searchItem) const
{
bool found = false;
nodeType<Type> *current; //pointer to traverse the list
current = first; //start the search at the first node
while (current != NULL && !found)
if (current->info >= searchItem) //THIS IS WHERE ITS ILLEGAL
found = true;
else
current = current->link;
if (found)
found = (current->info == searchItem); //test for equality
return found;
}//end search