M
Maria Mela
Hello Everyone,
What´s wrong in my code?? I can´t compile and sort my struct data...
Here´s peace of my code...
typedef struct student
{
int num_stu;
char name[40];
char team[5];
struct student *next;
}Student;
typedef Student *PtrStudent;
void Insert_Student (PtrStudent *lista);
PtrStudent apStudent =NULL;
****************
int sortbynumber(const Student *c1, const Student *c2)
{
return (c1->num_stu - c2->num_stu);
}
qsort (aux, PtrStudent, sizeof (Student), (void *) sortbynumber);
printf("\n\Sort Numbers: \n");
for(i=0; i<PtrStudent; i++){
printf("%d", auxnum_stu);
}
Kisses
What´s wrong in my code?? I can´t compile and sort my struct data...
Here´s peace of my code...
typedef struct student
{
int num_stu;
char name[40];
char team[5];
struct student *next;
}Student;
typedef Student *PtrStudent;
void Insert_Student (PtrStudent *lista);
PtrStudent apStudent =NULL;
****************
int sortbynumber(const Student *c1, const Student *c2)
{
return (c1->num_stu - c2->num_stu);
}
qsort (aux, PtrStudent, sizeof (Student), (void *) sortbynumber);
printf("\n\Sort Numbers: \n");
for(i=0; i<PtrStudent; i++){
printf("%d", auxnum_stu);
}
Kisses