Creating a linked list without declaring node as a pointer
问题 I've been searching around for a good while now on google and a few text books and I can't seem to understand why it is, when building a linked list, that the nodes need to be pointers. Eg. If i have a node defined as: typedef struct Node{ int value; struct Node *next; } Node; why is it that in order to create a linked list, I would say: Node *a = malloc(sizeof(Node)); Node *b = malloc(sizeof(Node)); a->value = 1; b->value = 2; a->next = b; b->next = NULL; rather than: Node a, b; a.value = 1;