qsort parameters

Rey Paulo rvp at softserver.canberra.edu.au
Thu May 9 14:25:56 AEST 1991


I would like to use qsort to sort an array of strings.  According to the 
manual of qsort, the parameters that must be supplied are base, nel, width,
and compare.  My problem is that width which is the size of each element in
the array, varies with each string element.  What value of width should I
pass to qsort to make it do the job.  My data structure is char *filenames[],
and I would like qsort to sort the array.

Any comment appreciated.
-- 
Rey V. Paulo                  | Internet:  rvp at csc.canberra.edu.au 
University of Canberra        | I am not bound to please thee with my answer. 
AUSTRALIA                     |         -Shylock, in "The Merchant of Venice" 
------------------------------+----------------------------------------------



More information about the Comp.unix.questions mailing list