BIG EDIT:
Ok, my original question didn't help me. Here is a second go.
My struct looks like this:
struct node {
char *name;
int age;
struct node *nextName;
struct node *nextAge;
};
I have to make two linked lists out of structures like this,. So i have 'rootAges' which keeps track of where the Age-based list starts and 'rootNames' which keeps track of where the names start. I can't seem to get these to update.
that is, i have struct node *rootAges and struct node *rootNames. I need to pass both of these to a function which adds the elements to the list. But i also need the roots to change as I add things to the list. the methods provided so far, haven't changed the value of rootAges for example in the main function, when it is altered in the add function.
Thanks!