0

Hello I have a question regarding linked list:

The assignment I was given was rather large so I'm not going to go into the full details of what exactly it does and give you just what is needed to answer the question.

First we have a student records structure

typedef struct student{
      char lname[10], initial, fname[10];
      unsigned long SID;
      float GPA;
}SREC;

What the program needs to be able to do is add and remove student records to and from a linked list ordered by either last name, first name, SID, or GPA. One of the ways that was suggested to implement this is to have 4 singly linked list all ordered by the four different ways.


So lets say i have a current SCREC, call it cREC for short, I'm wondering how to implement 4 singly linked list and then be able to add a cREC to it based on one of the elements in the cREC. Our book talks about linked list, but does not go into how to implement a linked list of structures.

Can anybody provide some starter code that would add a basic structure to a linked list of structures based on an element in the basic structure.

If you need anymore information about my assignment feel free to ask.

Thanks.

3
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by ashlock
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.