Hi all,
I'm trying to do some signal handling using the csignal library but I
can't find and specific examples for C++.
The signal function as defined in C takes a parameter that is the signal
we are registering for, and a second parameter that is the function to call.
What I want to do is specify the function to call as a function of an
instance of "this" class e.g.
void Class::signalHandler( int signal ){}
void Class::someFunction( ) {
signal( SIGINT, this.signalHandler );
}
Obviously this is wrong because it complains about signalHandler not
being a type.
How do I achieve this in C++? Can I achieve this in C++?
Thanks,
Lionel.