G
gilad
hi,
I would like to get the address of a class method in an instance.
In the following sample the third like access the method. how can I get
the address into a long variable - something like -
long addr = B->*local_method ... (this does not work)
class BCls {
public:
void method(void ) {
int k = 9;
};
BCls() { };
~BCls() {};
};
void main()
{
BCls * B = new BCls();
void (BCls::*local_method)(void) = &BCls::method;
(B->*local_method)();
}
Thanks,
Gilad.
I would like to get the address of a class method in an instance.
In the following sample the third like access the method. how can I get
the address into a long variable - something like -
long addr = B->*local_method ... (this does not work)
class BCls {
public:
void method(void ) {
int k = 9;
};
BCls() { };
~BCls() {};
};
void main()
{
BCls * B = new BCls();
void (BCls::*local_method)(void) = &BCls::method;
(B->*local_method)();
}
Thanks,
Gilad.