Thread: circularly linked lists

  1. #1

    circularly linked lists

    all right, i've got a complete linked struct list containing 29 names and each have pointers. Only thing is i need that last pointer to pointer the first node of the list struct. How can i do this, simple code would help, thanks.

  2. #2
    Try to keep track of the head and tail node when creating the list, so that when you want to know the link from the last node to the head - work decrease to 'tail->next' instead of having to traverse the list (each loop iteration checking current node to the head).

    If this doesn't help just send your email-address to
    '' and you'll get some code later.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Singly Linked Lists: Clarification Needed
    By jedispy in forum C++ Programming
    Replies: 4
    Last Post: 12-14-2006, 05:30 PM
  2. Linked Lists 101
    By The Brain in forum C++ Programming
    Replies: 5
    Last Post: 07-24-2004, 04:32 PM
  3. Map file formats and linked lists
    By Spitball in forum Game Programming
    Replies: 2
    Last Post: 03-04-2004, 11:32 PM
  4. need help w/ linked lists
    By MKashlev in forum C++ Programming
    Replies: 11
    Last Post: 08-05-2002, 08:57 PM
  5. doubly linked lists
    By qwertiop in forum C++ Programming
    Replies: 3
    Last Post: 10-03-2001, 06:25 PM