Quote:
First your program will ask the user how manys names will be inputed. Number of names will not exceed 100. Then ask the user for the names. Names will be in the format of "Last,First,age" with nospaces and there will always be three fields. Assume the user will always use this format. The names string will be at most 40 characters. After the user has inputed the names, ask how are they to be sorted. They are sorted by either last, first, or age. Then print the names out in sorted order. For people who have the same last name, sort by first name. For people with the same age, sort by last name and if that is also the same sort by first name. For people with the same first name, sort by last name. No two people will have the same first and last name.
I have almost everything done, except the data structure and sorting part. I'm trying to set up a linked list to store the information input by the user and sort them from there, so I wrote this: