From: Erik Max Francis Newsgroups: comp.os.msdos.djgpp Subject: Re: Function Pointers with Classes and QSORT Date: Mon, 23 Feb 1998 00:12:53 -0800 Organization: Alcyone Systems Lines: 19 Message-ID: <34F12F85.2A3BCFB3@alcyone.com> References: <34F0F322 DOT 4133902E AT earthlink DOT net> <34F125EC DOT EB2DEC03 AT LSTM DOT Ruhr-UNI-Bochum DOT De> NNTP-Posting-Host: newton.alcyone.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Thomas Demmer wrote: > I am not sure if this can work at all. I believe every class > member function has a hidden parameter, the "this"-variable. > And as qsort() as a normal C function doesn't know anything > about classes, this will probably always fail. qsort requires function pointers, and the names of member functions are member function pointers, not function pointers. One can use static member functions as the contents of a normal C-style member function pointer, though. -- Erik Max Francis, &tSftDotIotE / mailto:max AT alcyone DOT com Alcyone Systems / http://www.alcyone.com/max/ San Jose, California, United States / icbm://+37.20.07/-121.53.38 \ "I've got the fever for the / flavor of a cracker" / Ice Cube