I am doing something like this:
#include
class myClass {
public:
void myFunction ()
{
signal(SIGIO,myHandler);
}
To pass a pointer to a method, it must be a static method and you must specify the class name.
Try this:
class myClass {
void myFunction ()
{
signal(SIGIO, myClass::myHandler);
}
static void myHandler (int signum)
{
// blabla
}
};
And you should also read the link supplied by Baget, the paragraph 33.2 in the C++ FAQ.