Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!agate!dog.ee.lbl.gov!nosc!manta!grantk From: grantk@manta.NOSC.MIL (Kelly J. Grant) Newsgroups: comp.lang.c Subject: Re: external definition problems... Summary: stop....stop....I'm sorry....(gasp).... Message-ID: <2083@manta.NOSC.MIL> Date: 27 Jun 91 00:06:19 GMT References: <2080@manta.NOSC.MIL> Organization: Computer Sciences Corporation Lines: 24 In article <2080@manta.NOSC.MIL>, grantk@manta.NOSC.MIL (Kelly J. Grant) writes: [ a question shamelessly asked in the FAQ deleted in the interest of taste... ] Thank you for all your replies. I have always checked the FAQ before and never found my answer, so I got lazy. Sorry. You can stop sending flames, as we finally ran out of marshmallows. :-) The basic answer I wanted (kind of answered well in the FAQ) is why p[] is different than *p as an external reference. The answer is the compiler translates p[] into &p[0]. If you don't tell it p is an array, it does not know to do this translation. p is actually nothing, but a symbol whose reference was changed. Char *p expects p to be an actual pointer (a concept a 10 year C veteran here couldn't come up with). Thanks again Kelly -- Kelly Grant grantk@manta.nosc.mil (619) 225-2508 Computer Sciences Corp ^^^^^^^^ Important: manta.UUCP won't get to me 4045 Hancock Street "If you are given lemons.....see if you can trade for San Diego, CA 92110 chocolate" - me