Well, how can i sort structers according to one element of them??
so lets say i'd like to sort them according to the 'id' element of the structures, how do i do it??
Code:
struct PersonalData
{
int
char *FirstName;
char *LastName;
char *Birthday; // in the format of 12/30/1978
int id;
};
PersonalData PersonOne;
// Populate PersonOne with data
PersonOne.FirstName = "John";
PersonOne.LastName = "Doe";
PersonOne.Birthday = "12/30/1978";
PersonOne.id = 5;
// Populate PersonTwo with data
PersonTwo.FirstName = "Matt";
PersonTwo.LastName = "Thompson";
PersonTwo.Birthday = "15/20/1958";
PersonTwo.id = 3;