|
-
Jun 16th, 2004, 01:35 AM
#1
Thread Starter
New Member
Array sorting
I have an array in a custom type for my hockey game, for instance:
aPlayer(i).PlayerID
aPlayer(i).Firstname
aPlayer(i).Lastname
aPlayer(i).Weight
There's about 30 different attributes for each player as you can imagine. I'm trying to sort the list by Weight, but I'm having real trouble wrapping my head around it. I obviously need to keep the numbers in the same place (i.e. even if aPlayer(0).PlayerID was last on the list, he needs to stay aPlayer(0)). I guess I can create another array called aSort and fill this with the same information as aPlayer..but I'm not sure how to sort it properly.
Can I use a normal sorting routine? Because there's so many attributes, is it different? Can anyone post any sorting code that would be able to deal with this sort of array?
Sorry, it's really confusing me.
Thanks for your help in advance, sorry for the n00b question. Cheers
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|