An array of function pointers.

Doug Gwyn gwyn at smoke.ARPA
Sat Sep 17 00:50:02 AEST 1988


In article <414 at ucrmath.UUCP> jantypas at ucrmath.UUCP (John Antypas) writes:
>try to copy function addresses, the compiler complains.  How do I get the
>address of a funciton and put it into an array for calling later?

Just use the name of the (previously declared) function; that IS
a pointer to the function.  Note that all the function pointers in
your array should have the same type, which means that all the
functions themselves should have the same type.  (Also of course
the array needs to be declared as an array of pointers to functions
having that type.)



More information about the Comp.lang.c mailing list