title: Is it possible to use signal inside a C++ class?
body: <p>I am doing something like this:</p>
  
  <pre><code>#include &lt;signal.h&gt;
  
  class myClass {
  public: 
      void myFunction () 
      {
          signal(SIGIO,myHandler);
      }
  
      void myHandler (int signum)
      {
          /**
          * Handling code
          */
      }
  
  }
  </code></pre>
  
  <p>I am working on Ubuntu, using gcc. </p>
  
  <p>But it won't compile. It is complaining with:</p>
  
  <blockquote>
    <p>error: the argument with type <code>void (MyClass::)(int)</code> doesn't agree with <code>void (*) (int)</code></p>
  </blockquote>
  
  <p>Any clues? Or maybe it is just that I cannot use a signal inside classes? Are signals only allowed in C? </p>
  
  <p>The error message is an approximate translation because my compiler is not in English.</p>