I have a struct
typedef struct
{
int id;
string name;
string address;
string city;
// ...
} Customer;
I will have multiple customers so I need to store these structs in some sort of a list and then I need to sort by id. There a probably multiple solutions here and I have a few ideas myself but I am looking for the best solution in terms of performance.
Use the sort provided by the stl algorithms package, example: