title: Address of bound member function
body: <p>I have a the following member function:</p>
  
  <pre><code>void GClass::InitFunctions()
  { // Initialize arrays of pointers to functions.
  
  ComputeIntLen[0] = &amp;ComputeILS;
  ComputeIntLen[1] = &amp;ComputeILE;
  ComputeIntLen[2] = &amp;ComputeILI;
  PostStep[0] = &amp;PSS;
  PostStep[1] = &amp;PSE;
  PostStep[2] = &amp;PSI;
  gRotation = new Rotation();
  }
  </code></pre>
  
  <p>GClass obviously contains all the relevant members -:</p>
  
  <pre><code>    void ComputeILE(Int_t, Int_t *, Double_t *);
      void ComputeILI(Int_t, Int_t *, Double_t *);
      void PSS(Int_t , Int_t *, Int_t &amp;, Int_t*);
      void PSE(Int_t, Int_t *, Int_t &amp;, Int_t*);
      void PSI(Int_t , Int_t *, Int_t &amp;, Int_t*);
      ComputeIntLenFunc ComputeIntLen[gNproc];
      PostStepFunc      PostStep[gNproc];
  ... //other members
  }
  </code></pre>
  
  <p>where gNproc is a global const int and ComputeIntLenFunc and PostStepFunc are typedefs like this:</p>
  
  <pre><code>typedef void (*ComputeIntLenFunc)(Int_t ntracks, Int_t *trackin, Double_t *lengths);
  typedef void (*PostStepFunc)(Int_t ntracks, Int_t *trackin, Int_t &amp;nout, Int_t* trackout);
  </code></pre>
  
  <p>When I Compile this I get gcc gives an error: "ISO C++ forbids taking the address of an unqualified or parenthesized non-static member function to form a pointer to member function.  Say ‘&amp;GClass::ComputeIntLenScattering’ "</p>
  
  <p>When I replace FunctionNames by GClass::FunctionNames in InitFunctions() I get 
      "cannot convert ‘void (GClass::*)(Int_t, Int_t*, Double_t*)’ to ‘void (*)(Int_t, Int_t*, Double_t*)’ in assignment"</p>
  
  <p>Please help me. What topic of C++ is this ?</p>