BL> qsort(list, n, 80, sort);
PM> ^^^^
PM> If you're trying to sort using pointers, defining the element length as 80
PM> is wrong. You need to define it as the length of a pointer:
PM> qsort(list, n, sizeof(list[0]), sort);
Which is a better solution that sizeof(char *), because you don't need to
have the data type of list[0] coded in multiple places.
Personally I would use "sizeof list[0]" rather than
"sizeof(list[0])", for the same reason that I don't go x = (3) *
(4). BFN. Paul.
@EOT:
---
* Origin: X (3:711/934.9)
|