Quote Originally Posted by rcgldr View Post
I don't understand, do you want to move the node, or do you want to move a pointer back and forth on the list once the list is created? The example code fragment I posted is being used to create the list (in addition to the first allocation that went to head). If you're just trying to back up head to the start of the list after you create the list with the code in your previous post (without my suggested change):

Code:
/* ... */
    while(head->prev != NULL)
        head = head->prev;
That's it!! Thanks alot! But please explain to me why:
Code:
while(head != NULL)
didn't worked?