Thread: lists

  1. #1
    Unregistered
    Guest

    lists

    Would anybody happen to have a program that reads in a file into a linked list but doesn't need dummy values to initialise the list?
    So when u read in a file into a linked list u can store the values just from the file read instead of having to manually enter dummy values to initialise the list and then reading in the file.

  2. #2
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    You start with the first node. When you have read the first line of data and put it in the first node. Then if there is another line, you create a second node and let the first node point to this second node. You fill the second note. And this process goes on until you have reached the last line of data.

  3. #3
    Im back! shaik786's Avatar
    Join Date
    Jun 2002
    Location
    Bangalore, India
    Posts
    345
    Search the forums with the string: Linked List

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help creating lists of pointers
    By The_Kingpin in forum C Programming
    Replies: 2
    Last Post: 12-11-2004, 08:10 PM
  2. Question about Linked lists of lists
    By hear_no_evil in forum C Programming
    Replies: 2
    Last Post: 11-08-2004, 02:49 AM
  3. Linked Lists 101
    By The Brain in forum C++ Programming
    Replies: 5
    Last Post: 07-24-2004, 04:32 PM
  4. Map file formats and linked lists
    By Spitball in forum Game Programming
    Replies: 2
    Last Post: 03-04-2004, 11:32 PM
  5. need help w/ linked lists
    By MKashlev in forum C++ Programming
    Replies: 11
    Last Post: 08-05-2002, 08:57 PM