Thread: Circularly Double-Linked List Structure

  1. #1
    Registered User
    Join Date
    Apr 2002
    Posts
    23

    Circularly Double-Linked List Structure

    I wanna know how would you create the type definition structure for a circularly double-linked list?

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826

    Re: Circularly Double-Linked List Structure

    Originally posted by NavyBlue
    I wanna know how would you create the type definition structure for a circularly double-linked list?
    The same way you create any double linked list.
    Code:
    struct node {
        struct node *prev, *next;
    };
    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    You can point a the pointer members of quzahs pointers to any data, including itself or its parents.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. newbie needs help with code
    By compudude86 in forum C Programming
    Replies: 6
    Last Post: 07-23-2006, 08:54 PM
  2. Replies: 6
    Last Post: 03-02-2005, 02:45 AM
  3. Linked List Help
    By CJ7Mudrover in forum C Programming
    Replies: 9
    Last Post: 03-10-2004, 10:33 PM
  4. Inserting new nodes in a sorted double linked list
    By carrja99 in forum C++ Programming
    Replies: 2
    Last Post: 03-07-2003, 08:34 AM
  5. singly linked list
    By clarinetster in forum C Programming
    Replies: 2
    Last Post: 08-26-2001, 10:21 PM