TITLE: Casting of member function pointers PROBLEM: pete@borland.com (Pete Becker) Now watch what happens when the callback tries to call this function with two pointers to ints instead of two pointers to doubles. As ever, using a cast to throw away information can result in throwing away too much information. Here's a better way: typedef int (CallBackBase::*COMethod)(int*,int*); template Callback CreateCallback( T& t, int (T::*func)(int*,int*)) { return Callback(&t,(COMethod)f); } The template function guarantees that we don't get the parameter types wrong, which makes the cast of the pointer-to-member-function into COMethod safe. RESPONSE: jamshid@emx.cc.utexas.edu (Jamshid Afshar) No, that is still not safe. [deleted] this is still not safe because all member function pointers are not guaranteed to have the same size or representation. For example, some compilers (like Borland C++ 3.1 :-) are able to make the size of a member function pointer smaller if the class does not contain any virtual functions or bases.