Newsgroups: comp.lang.c++ Path: utzoo!utgpu!cunews!bnrgate!scrumpy!smithwicks!stu4 From: bnrmtl!stu4@larry.mcrcim.mcgill.edu (Craig Jones) Subject: Pointers to member functions Message-ID: <1991Jan18.222713.26249@scrumpy@.bnr.ca> Keywords: pointer, function, member, class Sender: news@scrumpy@.bnr.ca (USENET (Sandy Young)) Reply-To: bnrmtl!stu4@larry.mcrcim.mcgill.edu Organization: Bell Northern Research Montreal, Canada. Distribution: na Date: Fri, 18 Jan 91 22:27:13 GMT Let me say at the outset, I am new to C++ (but loving it) so please be patient with me if this is a simple question... I am trying to pass a pointer of a function (that is a member of a class) to the ftw() function (taken from ). My class is defined as follows: class fileclass { // some variables here int show_file (char*, struct stat*, int); // the above must be defined like this because of // restrictions in ftw(). public: fileclass (); void show (); ~fileclass (); }; And the functions as: 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; } The question is: How do I write the second parameter to the ftw function? Thanks for any time and help.... Craig bnrmtl!stu4@larry.mcrcim.mcgill.edu