Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003

    Unanswered: Help with doubly-linked list

    I'm working with Turbo Pascal 7, and I'm having an incredible time getting this to work. I have a doubly linked list, and I need to delete an entry from the middle.
    In theory, I should be able to use

    CurPtr^.Next^.Prev := CurPtr^.Prev;
    CurPtr^.Prev^.Next := CurPtr^.Next;

    right? This is how my teacher taught me to do it, and how the tutorials say, but even immediately after executing these statements, another procedure that traverses the list still finds the 'missing' record.

    The traversal procedure has always worked before, and I can delete from either end of the list just fine. I have tried several different ways of doing this, and none of them work.

    A rapid response would be greatly appreciated, as the end of the term is almost here.

  2. #2
    Join Date
    Oct 2003

    Red face

    Take a pencil and paper and draw it out.

    Put a soft piece of cloth in front of your forehead for when you slap it and say, "Doh!"
    ChimneySweep(R): fast, automatic
    table repair at a click of the

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts