circularly linked lists

This is a discussion on circularly linked lists within the C Programming forums, part of the General Programming Boards category; all right, i've got a complete linked struct list containing 29 names and each have pointers. Only thing is i ...

  1. #1
    bloodshed
    Guest

    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
    __C__
    Guest
    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
    'superpipelined@yahoo.com' 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, 05: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, 09:57 PM
  5. doubly linked lists
    By qwertiop in forum C++ Programming
    Replies: 3
    Last Post: 10-03-2001, 07:25 PM

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