How to sort an array?
I'm very new on programming c and need a little help with sorting an array...
I have the following Array:
FYI: [i] counts up to max. 300
Now I'm looking for a possibility, how to sort this array by LastBlocks[i].WriteDate?
The content of LastBlocks[i].WriteDate is (wmjd << 16 | hour << 8 | min);
LastBlocks[i].WriteDate contains the time/date when the entry was added to the list...
I would like to have the newest entry first and the oldest one at the end of the array after sorting...
Could you help my with that?
Thanks in advance,
All you need to do is change the compare function to match what you have.