C++ question
August Hörandl
august.hoerandl at gmx.at
Fri Aug 9 18:33:33 BST 2002
On Friday 09 August 2002 17:30, you wrote:
> 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.
short:
that doesn't work
long:
a method like aclass::amethod(int) has to be called with
an object like x.amethod(42); the signal handler will just call
amethod(42) -- and that wont't work; methods have a hidden
parameter called this and this is missing ;-)
some possible solutions:
- you have to use "normal" function as a signal handler, but that
function may call x.method(...) if x is a global object
- maybe a static method may work, but that may not be what you want
hth
Gustl
--
\|/
(o o)
======================oOO==(_)==OOo===================================
August Hörandl august.hoerandl at gmx.at
-
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