Path: utzoo!attcan!uunet!seismo!dimacs.rutgers.edu!rutgers!usc!zaphod.mps.ohio-state.edu!rpi!crdgw1!underdog!volpe From: volpe@underdog.crd.ge.com (Christopher R Volpe) Newsgroups: comp.lang.c Subject: Re: Passing Multi-dimensional arrays to a function Message-ID: <9905@crdgw1.crd.ge.com> Date: 18 Jul 90 12:46:35 GMT References: <1990Jul17.224910.20086@DRD.Com> Sender: news@crdgw1.crd.ge.com Reply-To: volpe@underdog.crd.ge.com (Christopher R Volpe) Distribution: na Lines: 39 In article <1990Jul17.224910.20086@DRD.Com>, tdh@DRD.Com (Tom Haynes) writes: > int ared2bf(struct st_edit **, int, char ***, int *, int *); > int cischa(int, char *, int, int, char **); > char buf[SCREEN][COLS][MAX_SCREEN]; > char prefix[6][KEYS]; > int curr; > curr = 0; > : > : > cischa(pnlptr, "PREFIX", 0, SCREEN, prefix[curr]); * ^^^^^^^^^^^^ * * prefix[curr] is of type (char *) whereas the formal parameter * is of type (char **). Maybe you wanted "&prefix[curr]"??? * > ared2bf9EDIT, curr, buf, free, list); > ardrvr.c(63) : warning C4047: 'arguement' : different levels > of indirection * *You haven't shown the reference to 'arguement' * > ardrvr.c(63) : warning C4024: 'cischa' : different types : > parameter 5 * * The is the one I pointed out above (prefix[curr]). * > ardrvr.c(64) : warning C4047: 'arguement' : different levels > of indirection > ardrvr.c(64) : warning C4024: 'ared2bf' : different types : > parameter 3 * *Beats me, buf is of type (char ***), and that's what the formal parameter *wants. * Chris Volpe G.E. Corporate R&D volpecr@crd.ge.com