Thread: linked list question

  1. #1
    Registered User
    Join Date
    Mar 2002
    Posts
    22

    linked list question

    i need to enter 4 values in a linked list in a structure, and i was wondering how can i enter the multiple values. i know how to enter 1 but not 4

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Use a loop? Use scanf, use whatever. You enter four values the same way you enter a single one. You either just add more to the single read line, or you read four times. Or your read two times twice... or...

    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User
    Join Date
    Mar 2002
    Posts
    95
    this question is a common one, try reading this thread:
    www.cprogramming.com/cboard/showthread.php?s=&threadid=13969
    shows using linked list's which are added by reading from a file but the principle is exactly the same and also sorts and prints the results

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linked List Not Saving Value as Int
    By bar338 in forum C Programming
    Replies: 4
    Last Post: 05-04-2009, 07:53 PM
  2. linked list question
    By brb9412 in forum C Programming
    Replies: 16
    Last Post: 01-04-2009, 04:05 PM
  3. singly linked circular list
    By DarkDot in forum C++ Programming
    Replies: 0
    Last Post: 04-24-2007, 08:55 PM
  4. singly linked list
    By clarinetster in forum C Programming
    Replies: 2
    Last Post: 08-26-2001, 10:21 PM