C++ FAQ Celebrating Twenty-One Years of the C++ FAQ!!!
(Click here for a personal note from Marshall Cline.)
Section 33:
[33.1] Is the type of "pointer-to-member-function" different from "pointer-to-function"?


Consider the following function:

int f(char a, float b);
The type of this function is different depending on whether it is an ordinary function or a non-static member function of some class:
  • Its type is "int (*)(char,float)" if an ordinary function
  • Its type is "int (Fred::*)(char,float)" if a non-static member function of class Fred

Note: if it's a static member function of class Fred, its type is the same as if it were an ordinary function: "int (*)(char,float)".