What I'm saying is that you can't just compare p->next, because that's a pointer. You would want to compare the average to p->next->num, which is the actual value contained in the node.
Reputation Points: 2240
Solved Threads: 338
Vampirical Lurker
Offline 5,055 posts
since Apr 2006