Hi guys,
OK, I know the answer to this problem is going to be obvious - but i can't see it for some reason.
I wrote a class for a linked list. I added three elements. only 2 get printed.
The problem is in the print() function - but i can't see what it is.
I'd appreciate your help.
Also, if you have any suggestions for the code - i'd really appreciate those too :)
You know that you are in the last element when iterator->next == NULL, but in your loop (line 67) the condition will be false for the last element thus it won't enter the loop.
Edit: Meh <_< Either my typing is really slow or there are a few ninjas around here.
@Zeillinger: I feel like kicking myself. I even wrote that in the draft I made before I started coding. I can't believe it was that obvious. Thanks a bucnh for the quick reply! :)