I'm trying to make a program where a user enters information: first name, last name, date of birth. Depending on what they choose in a menu, the program will display a sorted list of their first name or last name or by age.
I already have my code for the sorts already. That's not the hard part. I'm trying to plan how I'm going to display the code, and I'm not seeing how I would display the info.
Like I'll have the first name sorted and displayed, but it also needs to display the last name and the age, the info that wasn't sorted.
Right now the code I have has an array for first name, last name, date of birth.
So if I have these names
It would show
How would I keep the first name and the last name grouped together so when I sort the first name, it keeps track of the last name it belongs to.
So it will show like this
Hope I explained it well.
I'm thinking I would need a 3 dimensional array(first name,last name, date of birth) but that seems to be highly complicated, especially to sort and search it.
How would I keep it 1 dimensional but have some way to keep the unsorted info of a person together with the sorted info of a person.
I'm not asking for code, just if what I"m asking is possible or if I will have to go into multi-dimensional array.
This post has been edited by emblem: 27 September 2008 - 06:54 AM