Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!bbn!apple!vsi1!daver!athsys!jim From: jim@athsys.uucp (Jim Becker) Newsgroups: comp.lang.c Subject: Re: pointers to arrays Message-ID: <244@tityus.UUCP> Date: 16 Feb 89 23:07:01 GMT References: <19784@uflorida.cis.ufl.EDU> Organization: Athena Systems, Inc., Sunnyvale, CA Lines: 18 From article <19784@uflorida.cis.ufl.EDU>, by thoth@beach.cis.ufl.edu (Robert Forsman): > > OK, Gordon cross wants to take the address of an array, but not in > any normal way. If E is an array (yes I know it's upper case but > that's what he used) the &E should return a pointer to an array. My > question is "what will you use this for?" I had a problem w/ needing this functionality where I wanted to return a pointer to an allocated array of char* pointers via a procedure call. C did not allow me to do this. The case was one where I wanted the caller to get the content of a text edit buffer by passing a pointer to a *char[] type structure. I couldn't figure out how to do this because of the inability to pass &(*char[]). This may be doable, but I could not not get C to do it for me. I believe Gordons' addition would let me do this. -Jim Becker ...!sun!athsys!jim