Firstly, I got this class:
class A{
public:
void show() {
std::cout << "Hello World";
}
} a;
I am trying to get the address of show() function.
int main()
{
void (*ptr)();
ptr = &a.show;
*ptr();
return 0;
}
And, it doesn't seem to work at all. Any idea?