Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!whuxl!whuxlm!akgua!gatech!seismo!brl-adm!brl-smoke!smoke!woody%Juliet.Caltech.Edu@cit-hamlet.ARPA From: woody%Juliet.Caltech.Edu@cit-hamlet.ARPA Newsgroups: net.lang.c Subject: Array of pointers to functions Message-ID: <2398@brl-smoke.ARPA> Date: Sat, 5-Apr-86 17:36:11 EST Article-I.D.: brl-smok.2398 Posted: Sat Apr 5 17:36:11 1986 Date-Received: Wed, 9-Apr-86 08:35:17 EST Sender: news@brl-smoke.ARPA Lines: 23 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@Hamlet.Caltech.Edu USNAIL 1-54 Lloyd, Caltech / Pasadena, CA 91126