(Console C++ Application, to run on a 486 dx2 32 bit, 16 on dos)

I have to load this database, where the user gets to choose which fields are to be loaded. Also new fields not in db may be created on request, some may be removed as well.

Note I'm talking about fields inside the structure, not nodes of the list.

If you're thinking of making one big struct with all posible fields and some generic fields for those who the user may add, and load all even only displaying those chosen by the user, please don't reply. I can't do that: memory is precious, load time is even more precious!
The only thing I could think of is making maaaaaaaaany separate lists, one for each field, which later found to be the same time/space waste, only messier...

If somehow someone achieves this, here's my "& more" problem: what would be an efficient way of sorting this list by n-criteria (criteria and criteria priority chosen by the user), criteria being numeric/alphanumeric order of any of the fields in the list?
The main problem imo is that fields would need to be somehow generic in order to achieve a generic sorting method.

The complexity of both problems makes me think that perhaps lists might not be the optimum structure for this, but I can't think of a better one...

(Hint: somehow almost every db program out there did it...both things. And Grid, and FlexGrid controls on VB do it, Delphi analogue controls do it as well, even though none of those support n-sorting)

Well, any feedback on the matter will be greatly appreciated even if it doesn't solve my problem. Thx in advance!! Bye!

Mariano Lopez-Gappa (20) from Argentina