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

Recommended Answers

All 2 Replies

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.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.