Path: utzoo!mnetor!uunet!husc6!think!barmar From: barmar@think.COM (Barry Margolin) Newsgroups: comp.lang.c Subject: Re: VMS pointer problems continue. Message-ID: <18476@think.UUCP> Date: 24 Mar 88 07:30:29 GMT References: <12602@brl-adm.ARPA> Sender: usenet@think.UUCP Reply-To: barmar@fafnir.think.com.UUCP (Barry Margolin) Organization: Thinking Machines Corporation, Cambridge, MA Lines: 22 In article <12602@brl-adm.ARPA> V053MF43@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@think.com uunet!think!barmar