PE> You're not, you're trying to sort char *list[500]. To do that,
PE> you need:
PE> return(strcmp(*(char **)a, *(char **)b));
BL> WHAAATT!!????? What the fuck does THAT mean?
BL> We're typcasting "a" as a pointer to a character pointer, and then
BL> dereferencing it? JEESUZ!! I give up!! Are we passing the data behind
BL> the pointer-pointer, or the pointer behind the data-pointer?
Well, qsort will give you the address of an array element. The array
elements call have char * in them, so the ADDRESS of that, is char **. So
qsort is giving you a char **. But you're not after the address of the
array element, you're after the data that is stored in that element. So
you need to dereference it with *. BFN. Paul.
@EOT:
---
* Origin: X (3:711/934.9)
|