Array of pointers to functions
woody%Juliet.Caltech.Edu at cit-hamlet.ARPA
woody%Juliet.Caltech.Edu at cit-hamlet.ARPA
Sun Apr 6 08:36:11 AEST 1986
I'm confused. How do you specify an array of pointers to functions? Do
you do it:
int (*foo[])();
or do you do it:
int ((*foo)())[];
The reason why I'm asking is that I need to create a static array of
pointers to functions, and have it portable; my slightly used brain
cells tell me the second one makes sense (after all, a pointer to a
function is 'int (*foo)();'; thus, an array of them should be done by
adding the '[]' at the end). Yet, the C compiler I'm using wants it
the first way and the logic excapes me as to why.
Please send all responces directly to me. And please don't flame me;
I'm really confused about this point which is (as far as I can tell) not
in K&R.
- William Woody
NET Woody%Romeo at Hamlet.Caltech.Edu
USNAIL 1-54 Lloyd, Caltech / Pasadena, CA 91126
More information about the Comp.lang.c
mailing list