Putting the node class inside the list class is certainly one option.
Putting the node class inside the list class is certainly one option.
My homepage
Advice: Take only as directed - If symptoms persist, please see your debugger
Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"
I read the material here at first: Linked List Problems. When I first studied the topic, this was very helpful. It went very slow and I started to understand pointers a lot better. Then I studied it a second and third time, using other sites. This is another very good read, Eternally Confuzzled - Linked List Tutorial . I still use wikipedia as a reference.
Like other people have said, making a linked list library is the best way to get it, so keep doing what you're doing. My goal when I studied was to build a similar library to the material I was reading, and to understand all the parts of it. Watching things happen in a debugger, or simply testing parts made things very clear.
Making a linked list class library is not really something I'm very interested in doing, though I certainly could now. If I did make it I am sure I would be the only benefactor.
Last edited by whiteflags; 12-12-2011 at 06:34 PM.