Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!munnari.oz.au!manuel!csc.canberra.edu.au!news From: rvp@softserver.canberra.edu.au (Rey Paulo) Newsgroups: comp.unix.questions Subject: qsort parameters Message-ID: <1991May9.042556.5565@csc.canberra.edu.au> Date: 9 May 91 04:25:56 GMT Sender: Rey V. Paulo Organization: University of Canberra Lines: 13 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@csc.canberra.edu.au University of Canberra | I am not bound to please thee with my answer. AUSTRALIA | -Shylock, in "The Merchant of Venice" ------------------------------+----------------------------------------------