Greetings fellow ROM coders and enthusiasts.

In so making a table of, say, 'the top 10 player-killers', I have two questions.
Question 1:  What would be the easiest way of storing these players in a
structure?
For example:

The 'dumb' way:

struct {
   char name1 [MAX_INPUT_LENGTH];
   int name1pks;
   char name2 [MAX_INPUT_LENGTH];
   int name2pks;
   char name3 [MAX_INPUT_LENGTH];
   int name3pks;
....
} top_ten;

Or a smarter way, which I cannot think of offhand?

Question 2:
Based on this smarter method, how would you go about adding elements to the
list?
For instance, let's say you have a full 10 people on the list, and you need to
add someone at position 7.  You'd need to "shift" the remaining list down by 1,
drop off #10 to do so.

I most appreciate any guidance or help.

Thanks,

Jeremy Hill



Reply via email to