diesavagenation
11-23-2004, 02:56 PM
How would i go about sorting an array of this struct in C w/ qsort???
typedef struct{
int hour,min;
} Time;
typedef enum {Sun,Mon,Tue,Wed,Thu,Fri,Sat} DoWeek;
typedef struct {
char Name[29],Band[29],Venue[29];
DoWeek DoWeekday;
Time start;
int hall_size;
float cost;
} concert_record;
i need to sort this database by day and by venue(in alphabetical order)
typedef struct{
int hour,min;
} Time;
typedef enum {Sun,Mon,Tue,Wed,Thu,Fri,Sat} DoWeek;
typedef struct {
char Name[29],Band[29],Venue[29];
DoWeek DoWeekday;
Time start;
int hall_size;
float cost;
} concert_record;
i need to sort this database by day and by venue(in alphabetical order)