I have a struct like this:
struct db {
string name,sur;
int num;
};
And declared an array of db structs:
struct db a[10];
and every member of a[] is filled with a name, surname and a number but there can be the same number appearing multiple times. I need to sort the numbers, and print the results, i.e. sort by the num of each struct and the print the name, sur and the num in each line starting from the smallest num going down to the largest. I don't know how to do this, please help me.