Hello! I have this problem with creating a linked list inside a linked list. Think of it as recording a list of customers, and at the same time, recording a list of items they bought individually. I tend to think that I might lose the head node and it's probably what's making me crazy. Here's my code with initializing the LL inside an LL.
typedef struct custNode
{
char name[100];
typedef struct dish
{
char dishname[100];
int price;
int quantity;
dish *NEXT;
};
dish *head;
custNode *NEXT;
};
P.S. My professor told me that I might want to try initializing the pointer head inside the structure, but it appears that it's impossible. Thank you for the help!