0

If the prototype of my function is void sell_item(store **head,store **tail). In main i've passed sell_item(&head,&tail), where head & tail where both pointers of store(struct) type.

Now I want to access the the content where head is pointing to. How shall I access it? Like *head->next??? But this is not working.
where next is another member of store storing pointing to the next location of memory (pointing to next node).

2
Contributors
2
Replies
8
Views
4 Years
Discussion Span
Last Post by MRehanQadri
Featured Replies
  • `head` is a pointer to a pointer to a store. So `*head` is a pointer to a store. So `*(*head)` is a store. So `(*(*head)).next` is the member variable next of the `store`. Read More

1

head is a pointer to a pointer to a store.

So *head is a pointer to a store.

So *(*head) is a store.

So (*(*head)).next is the member variable next of the store.

This question has already been answered. 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.