Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!dixie.com!stan From: stan@Dixie.Com (Stan Brown) Newsgroups: comp.lang.c Subject: Re: HOW does "qsort" handle different variable type? Message-ID: <8638@rsiatl.Dixie.Com> Date: 23 Mar 91 20:55:23 GMT References: <1991Mar23.063112.22168@minyos.xx.rmit.oz.au> Organization: Dixie Communications Services Lines: 27 rcoahk@chudich.co.rmit.oz (Alvaro Hui Kau) writes: >Hi, => I am interested in HOW the system routine => handle different variable types.. = => Furthermore, WHY char casting is used for => the base pointer? = => Thanks. =>alvaro, qsort(0 only implements the *sort* alogrithim. It depends upon calls to a user suplied routine (strcmp for example) which can compare two objects of the type to be sorted and return the results of the comparison to it. I would referr you to an excelent article on the subjetc in C users magizine about sxi months ago. If you can't find it mail me & I will look up the issue for you. -- Stan Brown P. c. Design 404-363-2303 Ataant Ga. (emory|gatech|uunet) rsiatl!sdba!stan "vi forever"