title: Function pointer to member function
body: <p>I'd like to set up a function pointer as a member of a class that is a pointer to another function in the same class. The reasons why I'm doing this are complicated.</p>
  
  <p>In this example, I would like the output to be "1"</p>
  
  <pre><code>class A {
  public:
   int f();
   int (*x)();
  }
  
  int A::f() {
   return 1;
  }
  
  
  int main() {
   A a;
   a.x = a.f;
   printf("%d\n",a.x())
  }
  </code></pre>
  
  <p>But this fails at compiling. Why?</p>