hi I dnt knw clearly what type of
sgnl_action.sa_handler
is. But this is a little piece of code without any warning and errors might be helpful to you.
#include <stdio.h>
void (*sa_handler)(int); // function pointer takes int type
// arg and retuns void as we have to
//typecast func handle_alarm to this type
void handle_alarm() {
printf("helooo");
}
void main(int argc, _TCHAR* argv[])
{
handle_alarm(); //normal call to function
sa_handler = (void (*)(int))handle_alarm; // compatible typecast
sa_handler(0); // call with a function pointer
// as it takes one argument we have
//to pass a dummy arg.
}