Search:

Type: Posts; User: Norm

Search: Search took 0.22 seconds.

  1. Replies
    13
    Views
    1,730

    Re: Infinite loop on double linked list

    Add some debug code to the program that prints out the full list every time it is changed. For each node, print out its value and its links.
    Then as the code is executed you can immediately see...
  2. Replies
    13
    Views
    1,730

    Re: Infinite loop on double linked list

    One of the steps in designing a linked list is to use paper and pencil to draw a list.
    Then work out how the links need to be changed for the various changes that can be made to the list:
    add at...
  3. Replies
    13
    Views
    1,730

    Re: Infinite loop on double linked list

    Ok, then the code is working correctly? I thought you said there was a problem:
    It's only printing my last element.
  4. Replies
    13
    Views
    1,730

    Re: Infinite loop on double linked list

    Is the list properly chained? The loop stops when the prev link is null.
Results 1 to 4 of 4