Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!dimacs.rutgers.edu!seismo!ukma!wuarchive!julius.cs.uiuc.edu!ux1.cso.uiuc.edu!emills From: emills@ux1.cso.uiuc.edu (Evan Mills) Newsgroups: comp.os.msdos.programmer Subject: TC++ Question: Casting member func to reg func Keywords: C++, question Message-ID: <1990Nov16.203238.9409@ux1.cso.uiuc.edu> Date: 16 Nov 90 20:32:38 GMT Sender: emills@ux1.cso.uiuc.edu (Evan Mills) Distribution: usa Organization: University of Illinois at Urbana Lines: 27 Hello. I'm using the CXL function library from Turbo C++ and have run into a snag. I need to call a function which requires as a parameter a pointer to a function returning a void like this: int setonkey(...,void (*func)(void),...); If I declare a regular C function: void foobar(void); and call: setonkey(...,foobar,...); everything's peachy. Now I want to call a class member function: class Anything { ... void foobar(void); ... }; The closest I seem to be able to come is: setonkey(...,Anything::foobar,...); but even this fails. Suggestions *heartily* welcomed! Thanks in advance. --- Evan -- @@@@@@@@ @@@ @@@ @@@@@@@@ EVAN MILLS @@@ @@@ @@@ @@@ Programmer & Twin Peaks Fanatic @@@ @@@ @@@ @@@ (217) 244-5726 @@@@@@@ @@@ @@@ @@@ @@@@@@@