S
sledge
Hi,
I am porting some legacy C code to C++. The code has a lot of member
function pointers like
class X {
int (*a)(int,int);
void (*b)(char t);
int x;
int f(int,int);
};
main()
{
// declare a pointer to member function
void (X::*a) (int) = &X::f;
This does not seem to work. What is the right syntax to handle the
function pointer?
Thanks
Sledge
}
I am porting some legacy C code to C++. The code has a lot of member
function pointers like
class X {
int (*a)(int,int);
void (*b)(char t);
int x;
int f(int,int);
};
main()
{
// declare a pointer to member function
void (X::*a) (int) = &X::f;
This does not seem to work. What is the right syntax to handle the
function pointer?
Thanks
Sledge
}