linked list question

This is a discussion on linked list question within the C Programming forums, part of the General Programming Boards category; i need to enter 4 values in a linked list in a structure, and i was wondering how can i ...

  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, 08: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, 09:55 PM
  4. singly linked list
    By clarinetster in forum C Programming
    Replies: 2
    Last Post: 08-26-2001, 11:21 PM

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