Circularly Double-Linked List Structure

This is a discussion on Circularly Double-Linked List Structure within the C Programming forums, part of the General Programming Boards category; I wanna know how would you create the type definition structure for a circularly double-linked list?...

  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, 01:45 AM
  3. Linked List Help
    By CJ7Mudrover in forum C Programming
    Replies: 9
    Last Post: 03-10-2004, 09: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, 07:34 AM
  5. singly linked list
    By clarinetster in forum C Programming
    Replies: 2
    Last Post: 08-26-2001, 10:21 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21