Hello,
I'm trying to make a circular list by modifying an existing simple-linked list. I'm having a problem when testing whether or not a node is valid. The old code looked like this:
return (elem == NULL);
Now with a circular list I have my sentinel node and what I'm trying to do is to see if the current node is pointing towards the sentinel:
return (elem != sentinel);
However when I try to do this I get a "invalid use of nonstatic data member". Could someone explain to me what does this mean and how to fix it? Thanks!