title: C++ cast pointer to static method
body: <p>I haven't write C++ code in a long while; however now I have to work on a texas instruments F28335 DSP and I am trying to migrate from C to C++.
  I have the following code that is trying to initialize an interrupt service routine with a static method of a class:   </p>
  
  <pre><code>//type definition for the interrupt service routine
  typedef interrupt void (*PINT)(void);
  //EPWMManager.h
  class EPWMManager
  {
  public:
      EPWMManager();      
      static interrupt void Epwm1InterruptHandler(void);  
  };
  //EPWMManager.cpp
  interrupt void EPWMManager::Epwm1InterruptHandler(void)
  {
   //some code to be called on interruption
  }   
  //main.cpp
  int main(void)
  {
      PINT p;
      p = &amp;(EPWMManager::Epwm1InterruptHandler);
      return 0;
   }
  </code></pre>
  
  <p>When compiling I get the following:</p>
  
  <blockquote>
    <p>error: a value of type "void (*)()" cannot be assigned to an entity of type "PINT"</p>
  </blockquote>
  
  <p>I guess I'm missing some cast.    </p>