Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!bionet!ames!dftsrv!nssdcs!setzer From: setzer@nssdcs.gsfc.nasa.gov (William Setzer (IDM)) Newsgroups: comp.lang.c Subject: Re: Declaration Question Message-ID: <397@dftsrv.gsfc.nasa.gov> Date: 25 Jul 89 22:34:43 GMT References: <394@dftsrv.gsfc.nasa.gov> <1242@atanasoff.cs.iastate.edu> Sender: news@dftsrv.gsfc.nasa.gov Reply-To: setzer@nssdcs.UUCP (William Setzer (IDM)) Distribution: usa Organization: NSSDC Greenbelt Md. Lines: 15 In article <1242@atanasoff.cs.iastate.edu> hascall@atanasoff.cs.iastate.edu.UUCP (John Hascall) writes: >In article <394> setzer@nssdcs (William Setzer (IDM)) writes: >> [Stuff I said] > "char *foo[K][N]" is "array K of array N of pointer to char" which doesn't > match your picture, how about "char (*foo[K])[N]" which is "array K of > pointer to array N of char" which seems to match your picture I thought that things adjacent to a name had priority over things farther away, ie, '*foo[][]' = '(*(foo[]))[]'. Oh well, I guess I'd better check again. > and you will need to malloc the K sets of "N chars" yourself Then that means that if you say 'char (*foo[K])[N]', then at best the '[N]' part is lint fodder (no offense to lint intended). What's the point? -- William Setzer setzer@epsl.umd.edu ; My 'real' mail address