Array of pointers to functions
Davidsen
davidsen at steinmetz.UUCP
Fri May 2 07:04:36 AEST 1986
Another way to build unusual declarations is by repeated typedefs. The
previous posting gave as an example "array of pointers to function
returning integer", which is "int (*foo[])()".
To build this up:
typedef int fri(); /* function returning int */
typedef fri *pfri; /* prointer to function ret. int */
typedef pfri apfri[20]; /* array (size 20) of ... */
Then:
apfri foo; /* declares the array */
--
-bill davidsen
seismo!rochester!steinmetz!--\
/ \
ihnp4! unirot ------------->---> crdos1!davidsen
\ /
chinet! ---------------------/ (davidsen at ge-crd.ARPA)
"Stupidity, like virtue, is its own reward"
More information about the Comp.lang.c
mailing list