I am very much a beginner and trying to create a linked list, asking the "user" to input 5 or 6 values. My problem is that I don't know the correct terminology or how to store the user's input so that I can create my pointer to the next value and so on. My understanind of the topic is not great, and I think I'm missing a very easy concept. Either way...all I want to do is create the linked list and eventually be able to add more values to it if necessary.
After reading other forums, I understand that ever using the gets() is a bad idea as it has no buffer. Any help or advice is much appreciated.
Thanks.

specify the requirements clearly :

what do you want to store in linked list numbers or names(strings).
if numbers are to be stored use scanf
else use fgets or
you can define one safe function for reading strings.
post your program here so that you will get some guidelines on how to follow.

I am very much a beginner and trying to create a linked list, asking the "user" to input 5 or 6 values. My problem is that I don't know the correct terminology or how to store the user's input so that I can create my pointer to the next value and so on. My understanind of the topic is not great, and I think I'm missing a very easy concept. Either way...all I want to do is create the linked list and eventually be able to add more values to it if necessary.
After reading other forums, I understand that ever using the gets() is a bad idea as it has no buffer. Any help or advice is much appreciated.
Thanks.

@nick
linked is is not so difficult,you have to think what you are going to do then generate your code:
here wm defining you how to initialize a linked list
first of all build a structure of node like this
struct node
{
and then initialize the data type ,like if you want to take name,age,height of the user as input so initialize their data type like this:
char name[20];
int age;
float height;
after initializing them initialize the next pointer,which will point your next node like this
node*next;
this is the structure of a node in linked list..
here is the complete code of it:
sruct node
{
char name[20];
int age;
float height;
node *next;
};

Edited 6 Years Ago by ZON: im Faizan Ahmed,if u have any comments regarding my comments do reply me...thanks

I am very much a beginner and trying to create a linked list, asking the "user" to input 5 or 6 values. My problem is that I don't know the correct terminology or how to store the user's input so that I can create my pointer to the next value and so on. My understanind of the topic is not great, and I think I'm missing a very easy concept.

Sounds like you need to learn and understand what a linked list is and how it operates. http://en.wikipedia.org/wiki/Linked_listStart here[/url].

This article has been dead for over six months. Start a new discussion instead.