Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!pacific.mps.ohio-state.edu!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!austin From: austin@bucsf.bu.edu (Austin Ziegler) Newsgroups: comp.lang.c Subject: Re: Help... Message-ID: <39953@bu-cs.BU.EDU> Date: 10 Oct 89 18:41:54 GMT References: <731@carroll1.UUCP> <39902@bu-cs.BU.EDU> <1254@virtech.UUCP> Sender: daemon@bu-cs.BU.EDU Organization: Boston University College of Engineering Lines: 22 In-reply-to: cpcahil@virtech.UUCP's message of 10 Oct 89 11:54:32 GMT On 10 Oct 89 11:54:32 GMT, cpcahil@virtech.UUCP (Conor P. Cahill) said: Conor> In article <39902@bu-cs.BU.EDU>, austin@bucsf.bu.edu (Austin Conor> Ziegler) writes: > I don't know, but I just tried it. One possibility is to strcat a \0 > to the end of h before printf'ing h. Otherwise, you can get the same > result from char *h, and not get too many problems. Conor> You can't scanf(.) into a char *h without first assigning the *h to Conor> point to a real storage area. Oops. Yes, you do need to assign the *h to point to a real storage area. My mistake. Everybody makes them sometime. Thanks for the kind clarification, unlike someone who posted an unnecessary flame. As I said earlier, it also might help to make sure that you strcat a '\0' just to insure that the string is properly defined. I have had problems like that before and this solved it. \|/ Elminster, Sage of Shadowdale -*- /|\ austin@bucsf.bu.edu (the REAL address)