array names and pointers
Pete Gontier
gurgle at well.sf.ca.us
Tue Oct 2 13:50:18 AEST 1990
I need a lesson in the semantic differences between passing the name of an
array and passing a pointer to the type of that array. In other words, how
does the following usage differ?
typedef char Str255 [ 256 ];
Str255 s;
char * s;
void pstrcpy ( char * source, char * target ) {
}
void main ( void ) {
Str255 target;
pstrcpy ( "\ptest", target );
}
Don't worry; I know very well that this won't compile. I wish it would.
Figuring out why it won't (or why it "shouldn't") is my intent here.
Please reply by mail; if I get non-trivial answers, I will summarize and
post them.
--
Pete Gontier, gurgle at well.sf.ca.us
Software Imagineer, Kiwi Software, Inc.
More information about the Comp.lang.c
mailing list