Friday, 9 August 2013

Function pointer syntax in C

Function pointer syntax in C

I'm learning C and in particular function pointers, I think I understand
the basics.
However, this syntax baffles me, I'm not sure how to read this. I've run
this through cdecl and tried reading it over and over but I'm not sure how
to approach it.
char (* ( *f())[])();
I've tried compiling it and it works. I realize there is a pointer to a
function here, and that it returns a function pointer itself - however, I
don't know how to really read it. I went to open-std to check the
specification but was unable to find the exact syntax for a function
pointer to a function pointer.
If anyone could break this up for me - or tell me how I could break this
up myself I would really appreciate it. Extra points for answers who
explain how to approach these problems in the future. I tried searching
for similar questions in Google and here but was unable to find anything
this complicated.

No comments:

Post a Comment