maverick_pol
27th May 2009, 12:27
Hi guys,
I have a question: Could you help me with explaining this declaration:
void (*signal(int num, void (*func)(int)))(int);
I thought it was:
signal is a pointer to function returning nothing accepting two arguments, an int and a pointer func to a function returning nothing and accepting an int argument... but... I do not know what the last (int) stands for....
Thanks.
[SOLUTION]
SIGNAL is a function taking 2 arguments( int, pointer to a function returning void and taking an int argument) and returning a pointer to a function taking int and returning void.
AM I RIGHT?
I have a question: Could you help me with explaining this declaration:
void (*signal(int num, void (*func)(int)))(int);
I thought it was:
signal is a pointer to function returning nothing accepting two arguments, an int and a pointer func to a function returning nothing and accepting an int argument... but... I do not know what the last (int) stands for....
Thanks.
[SOLUTION]
SIGNAL is a function taking 2 arguments( int, pointer to a function returning void and taking an int argument) and returning a pointer to a function taking int and returning void.
AM I RIGHT?