I would like to dynamically allocate memory for nodes in a linked list. I used to use malloc() and free() afterwards, but heard lately that it's simpler (with certain limitations like running out of memory) to use alloca().
My question is what to put inside the brackets. If this is my person:
what should this line look likeCode:typedef struct node { char name[10]; int age; int id; struct node *next; } Person;
I tried to put sizeof(Person) but it fails miserablyCode:Person *new = alloca(???)