Hi im trying to get a sort function working in a program im writing, basically ive got an array of structures of
struct person
{
char name[20];
char address[20];
char address2[20];
char tphneno[12];
char email[30];
};
and i want a function to sort them alphabetically by name in the form similar to this
void sort_person (struct person *p, int dcount)
where p is the pointer to the array of records and dcount is the total number of records...
Anyone get what im on about or any got any ideas to help me... ive tried bubble sorting but i think i did it wrong cos when i call the function it sorts but then just quits out of the program for no reason... if anyone can show me how to bubble sort it properly i would be grateful