Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!sdd.hp.com!hp-col!hpldola!hp-lsd!jimr@hplsdv7.COS.HP.COM From: jimr@hplsdv7.COS.HP.COM (Jim Rogers) Newsgroups: comp.unix.questions Subject: Re: qsort parameters Message-ID: <7370026@hplsdv7.COS.HP.COM> Date: 9 May 91 22:03:58 GMT References: <1991May9.042556.5565@csc.canberra.edu.au> Organization: HP Logic Systems Division - Col Lines: 14 Since your data structure is char *filename[] you should pass sizeof(filename[0]) as the size of your element. Your strings may differ in size, but the arrays of characters which hold your strings are all the same size. This size is the "element" size required by qsort. Remember that a string in C is an array of characters with a '\0' somewhere in that array. The position of the '\0' determines the length of the string but not the size of the array. Jim Rogers Hewlett-Packard Company Colorado Springs, Colorado United States of America