How can I dump the element of a Linked List in the reverse order?
I have got a topic about "double linked list" post last night. But I cannot find it anywhere in the forum. (Is it being eaten up by the server?)
Anyway, I remember a guy suggested using Double Linked list. And then anyother guy suggested that using a simple member function in a Single Linked List would do.
However, I found that the code he provided is not usable. Can anyone suggest a way to do so?
Up to now, since the single link list only keep track of the pointer to the next element but not the previous one, so I can't figure out how I can print the elements of the list to the screen in the First In First Out order yet.
Could anyone please help? Thanks~
Re: How can I dump the element of a Linked List in the reverse order?
Quote:
Originally posted by Yin
I have got a topic about "double linked list" post last night. But I cannot find it anywhere in the forum. (Is it being eaten up by the server?)
Try the C Board Search engine (Search By Keyword) and type: double linked list
Re: Re: How can I dump the element of a Linked List in the reverse order?
Quote:
Originally posted by Monster
Try the C Board Search engine (Search By Keyword) and type: double linked list
I did try, but in vain. I dunno why the search engine often seems to be useless to me. It often gives me the result "no match". Anyway, I have found my thread already as it is pushed up by some responders of my previous thread.