Malfunction
Junior Contributor
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 wasn't 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 wasn't a problem but sorting by names is.
if (courseA.Name > courseA.Name) ....
Is not sorting correctly.