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
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
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.
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