Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site nsc-pdc.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!harvard!talcott!panda!genrad!decvax!tektronix!reed!nsc-pdc!joemu From: joemu@nsc-pdc.UUCP (Joe Mueller) Newsgroups: net.lang.c Subject: Re: Re: How do I declare... Message-ID: <476@nsc-pdc.UUCP> Date: Mon, 26-Aug-85 19:46:18 EDT Article-I.D.: nsc-pdc.476 Posted: Mon Aug 26 19:46:18 1985 Date-Received: Fri, 30-Aug-85 00:00:17 EDT References: <368@persci.UUCP> <159@rtp47.UUCP> Organization: NSC Portland Development Center, Portland Oregon Lines: 23 > Thus, if you want an array of pointers to arrays of pointers, you can't > do it. Nor can you declare functions returning pointers to functions. You have to be kidding, you can declare both of these things although the syntax may be a little weird. Here's an array of 5 pointers to arrays of 6 pointers to char char *(*foo[5])[6] /* how do you like that sports fans! */ Here's a function returning a pointer to a function returning an int int (*foo())() If you have trouble declaring things or deciphering existing code, I highly recommend a utility called "cdecl". It takes an english description of what you want and gives you the C syntax for it, it will also take a C declaration and translate it to an english description of what it is. I used it on the above examples so I got the declaration right the first time with minimal fuss. It has been posted to the net at least once before, if you absolutely can't find it elsewhere and you want a copy, I'll send it to you. If too many people need it, I'll post it to the net. The language has hooks to declare incredibly complex data structures, if your compiler can't hack it, it's not the language's fault.