Hey everyone,
I'm attempting to write a program that will contain multiple C-DLLs. I currently have 2 structs:
struct CDLL_Node {
char value[30];
struct CDLL_Node *next;
struct CDLL_Node *prev;
};
typedef struct CDLL_Node node;
struct listHolderRecord {
char label[30];
struct listHolderRecord *next;
node *headAddr;
};
typedef struct listHolderRecord listHolder;
The first will be for creating C-DLL's, the second will be for storing them in a SLL It will hold a label for each and the address of the list that that label corresponds to. I can create the C-DLL no problem. What I'm having problems with is when I try to add the head pointer to the second list.
I pass it as a parameter through a function as shown below.
listOfLists->headAddr = headNode;
For some reason, it crashed right here. I know the headNode is correct because the line above it I can print values out from it. I just dont know why it wont let me assign it to the "listOfLists->headAddr" var. Could anyone point me in the right direction as to how to fix this? I've been trying to for hours.
Any help would be much appreciated.
Thanks!
Barefoot