Date: Sat, 15 Jun 2002 00:36:08 +0200 From: Nicolas Rachinsky <list@rachinsky.de> To: hackers@FreeBSD.ORG Subject: Re: sorting in C Message-ID: <20020614223608.GA16612@pc5.abc> In-Reply-To: <B92FB0C7.2549%dan@arlow.com> References: <20020614124530.GA16778@lnuxlab.ath.cx> <B92FB0C7.2549%dan@arlow.com>
next in thread | previous in thread | raw e-mail | index | archive | help
* Dan Arlow <dan@arlow.com> [2002-06-14 14:40 -0400]: > dumb question: extra "&" in the previous post? > > why do both this > > qsort(&array, NUM_INTS, sizeof(*array), > > (int (*)(const void *, const void *)) comp); > and this > qsort(array, NUM_INTS, sizeof(*array), > (int (*)(const void *, const void *)) comp); > > work properly? I tried both and both compile/run/sort fine. > > (the difference afaik is that the first passes an *int[] aka int** and the > second passes an int[] aka int*) No, see http://www.eskimo.com/~scs/C-faq/q6.12.html Nicolas To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020614223608.GA16612>