Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!sdd.hp.com!zaphod.mps.ohio-state.edu!lavaca.uh.edu!menudo.uh.edu!lobster!urchin!p0.f506.n106.z1.fidonet.org!Roy.Browning From: Roy.Browning@p0.f506.n106.z1.fidonet.org (Roy Browning) Newsgroups: comp.lang.c++ Subject: Pointers to member functions Message-ID: <6284.279EFF22@urchin.fidonet.org> Date: 24 Jan 91 03:51:50 GMT Sender: ufgate@urchin.fidonet.org (newsout1.26) Organization: FidoNet node 1:106/506.0 - Fulcrum's Edge, Spring TX Lines: 35 In a message of , Craig Jones (1:106/88@fidonet) writes: >void fileclass::show() >{ > ftw(path, &show_file, 100); >} ^^^^^^^^^^^ Not sure what to put here. > >int fileclass::show_file(char* path, struct stat* status, int depth) >{ > printf("%s\n", path); > return 0; >} Craig: I you declare the "show_file" member to be "static" then create a wrapper function along the following format. inline _cdecl int WrapperShow_File(char* path, stat* status, int depth) { return classname::show_file(path, status, depth); } If "show_file" isn't static then you have to call it via a specific instance. inline _cdecl int WrapperShow_File(char* path, stat* status, int depth) { return instancename.show_file(path, status, depth); } Substitute the 'C' wrapper function for the member name in the call to "ftw". This should work per your request. On the learning C++urve, Roy Browning