PDA

View Full Version : Complex declaration[SOLVED?]



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?

maverick_pol
28th May 2009, 07:46
I am quite sure the answer is correct, so this thread is closed.

Hope this helps someone.

Thanks.