0

I want to print address of method f1.

I don't want to make it static.

#include <iostream>
using namespace std;

class a1{
public:
    void f1(){   
    }
};
int main(){
    a1 ma;
    cout << &ma.f1;
    return 0;
}
Amir
  • 1,638
  • 19
  • 26
  • What's the problem you're trying to solve? There's no portable way to do that specifically. – George Nov 07 '18 at 21:49
  • @George in SetWindowsHookEx i should register a call back method and i don't want to register an static one because i have to change all methods and properties as static to use them in my callback function. – Amir Nov 07 '18 at 23:03

0 Answers0