TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: David Nugent
from: Shane Day
date: 1994-08-28 18:21:02
subject: #$^%$&%$!!!!

* David Nugent >>> Shane Day  

 >> What is wrong with the following code?  Why won't it accept
 >> the parameter for qsort?

 DN> A non-static class member function is not like a normal function.
 DN> You can't mix and match them.

Makes sense...

 >> I keep getting "Use :: to take pointer to member function"
 >> errors, but no matter how many ways I use the :: operator, it
 >> won't accept the parameter.

 DN> Yup.

 DN> Consider what a member function is and does, particularly in
 DN> relation to the 'this' pointer. 'static' removes these special
 DN> qualities.

Yep.  It works.

I made the changes you suggested, and passed phone_database::cmp to
qsort(), and it works fine.

Thanks, David.  You're a legend.  ;-)

Shane

--- FMail 0.94

* Origin: A Saucerful Of Secrets (3:620/260.1)
SEEN-BY: 50/99 54/54 620/243 246 250 251 252 260 262 623/630 624/50 711/409
SEEN-BY: 711/410 430 807 808 809 932 934 712/623 713/888 714/906 800/1
@PATH: 620/260 250 243 54/54 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.