external definition problems...
Kelly J. Grant
grantk at manta.NOSC.MIL
Thu Jun 27 10:06:19 AEST 1991
In article <2080 at manta.NOSC.MIL>, grantk at 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 at 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
More information about the Comp.lang.c
mailing list