VMS pointer problems continue.
Barry Margolin
barmar at think.COM
Thu Mar 24 17:30:29 AEST 1988
In article <12602 at brl-adm.ARPA> V053MF43 at ubvmsc.cc.buffalo.EDU (Mike Ayers) writes:
>$type q.c
>char *wr(a)
>int a;
>{
>char b = "Arf!";
>
>return(b);
>}
I'm surprised this even compiled. The type of b is char, but the type
of "Arf!" is char*, and so is the type of the return value of wr. You
should declare it
char *b = "Arf!";
Barry Margolin
Thinking Machines Corp.
barmar at think.com
uunet!think!barmar
More information about the Comp.lang.c
mailing list