0

struct list_link
{
int key; // identifies the data
double value; // the data stored
struct list_link* next; // a pointer to the next data
};


struct list_link* create(int key, double value, struct list_link* next)
{
return 0;
}


the "struct list_link" contains two variables and a pointer.

what exactly is this "struct list_link* create(int key, double value, struct list_link* next)" ?

here create is a pointer to structure or is it a function to structure??

can anyone pls explain me what exactly is *create??

3
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by arshad115
0

It's a function that is supposed to return a pointer to a list_link. As defined though, it doesn't doesn't do anything useful.

Edited by Fbody: n/a

0

here struct list_link* create(int key, double value, struct list_link* next) is a (list_link) type-pointer function.which will work on a structure object.

like this:

list_link temp;
temp.create(key, value, next);

I think you are creating a linklist with structures that point to other nodes with *next pointer.
and store two data values,one int and one double.

you can create nodes and link them together.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.