Help...
Austin Ziegler
austin at bucsf.bu.edu
Wed Oct 11 04:41:54 AEST 1989
On 10 Oct 89 11:54:32 GMT,
cpcahil at virtech.UUCP (Conor P. Cahill) said:
Conor> In article <39902 at bu-cs.BU.EDU>, austin at 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 at bucsf.bu.edu (the REAL address)
More information about the Comp.lang.c
mailing list