In C++ programming, there are concepts of member function and variable. When a pointer points to an object and calls its member function it is known as pointer to member function. Its prototype is different from the ordinary function prototype. For example:
include
using std::cout;
void fun1(int x)
{
int y = x;
cout << y;
}
typedef class
{
int a;
public:
int fun1(int x)
{ a = x; cout << a;}
}X;
int main()
{
fun1(10); // first call
X x;
x.fun1(10); // Second call
return 0;
}
Conclusion: first call of function "fun1" is pointer to function and second call of "fun1" is pointer to member function of class X;