Malfunction
Well-known member
I have a struct
struct list
{
int No;
char *Name;
};
and the "instance"
struct list courseA[5];
initialised with five names and numbers.
I needed two functions to sort courseA by names and number. The latter wasnt a problem but sorting by names is.
if (courseA.Name > courseA.Name) ....
Is not sorting correctly.
struct list
{
int No;
char *Name;
};
and the "instance"
struct list courseA[5];
initialised with five names and numbers.
I needed two functions to sort courseA by names and number. The latter wasnt a problem but sorting by names is.
if (courseA.Name > courseA.Name) ....
Is not sorting correctly.