C++ question

Israel Fernández israel at seg.inf.cu
Fri Aug 9 16:30:06 BST 2002


I did somthing like that, but it don't work yet. I'm getting an error messae 
saying:
"cannot convert void (CSavdaemon::*) (int) to void (*) (int)"

My task is to manage the SIGTERM signal in a daemon, CSavdaemon is main class 
of the application, the class has a member named void kill_all(int 
signal_number), I need to pass this function as a parameter to the signal 
function declared in <signal.h>, this is to install a new signal handler for 
a given signal number.
What I guess the error message is clear, no posible convertion, but I dont 
know how to fix this problem.
I'll apretiate any hint.
best reg at rds
Israel

El Jue 08 Ago 2002 03:23 PM, escribió:
> Israel Fernández wrote:
> > Hi this is a bit offtopic but.. any way, th question is:
> > I need that a function takes as argument a class method but I don't know
> > how to do this. the function in question is signal() from <signal.h>.
> >
> > thanks in advance
>
> Do you need the declaration for your function ?
>
> It looks like this:
>
> ReturnArg funcName( ArgReturnArg (ClassName::*
> argFuncName)(ArgFuncParameters));
>
> to obtain the pointer to the method write this:
>
> ArgReturnArg (ClassName::* funcPtr)(ArgFuncParameters) =
> 	 & Class::funcName;
>
>
>
> -
> to unsubscribe from this list send an email to
> kdevelop-request at kdevelop.org with the following body: unsubscribe
> »your-email-address«

-- 
S at lu2
Israel Farnandez Cabrera

-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop mailing list