From owner-freebsd-hackers Fri Jun 14 11:40:37 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp.comcast.net (smtp.comcast.net [24.153.64.2]) by hub.freebsd.org (Postfix) with ESMTP id B49E337B40A for ; Fri, 14 Jun 2002 11:40:07 -0700 (PDT) Received: from [192.168.123.138] (bgp935555bgs.brmngh01.mi.comcast.net [68.40.208.108]) by mtaout02.icomcast.net (iPlanet Messaging Server 5.1 HotFix 0.8 (built May 13 2002)) with ESMTP id <0GXP00F3VL6UCV@mtaout02.icomcast.net> for hackers@freebsd.org; Fri, 14 Jun 2002 14:40:07 -0400 (EDT) Date: Fri, 14 Jun 2002 14:40:07 -0400 From: Dan Arlow Subject: Re: sorting in C In-reply-to: <20020614124530.GA16778@lnuxlab.ath.cx> To: hackers@freebsd.org Message-id: MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT User-Agent: Microsoft-Outlook-Express-Macintosh-Edition/5.02.2022 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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*) -dan (noob) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message