My assignment requires the use of the following linked list structure:
struct studentNode {
int id;
char *fname;
char *lname;
int programs[x];
int labs[x];
int exams[x];
int percent;
double grade;
struct studentNode *next;
};
My problem is, the arrays for programs, labs and exams are being loaded from a file and are to be variable lengths.
I tried using a pointer to the array, however whenever I updated the array for a new student it would replace the scores for everyone in the linked list.
I've tried going over this with the instructor and he tells me to google it. :(
So far, I haven't had any luck and it's beyond the scope of what our book covers.
Any help would be appreciated.