Help...

Conor P. Cahill cpcahil at virtech.UUCP
Wed Oct 11 11:25:27 AEST 1989


In article <39953 at bu-cs.BU.EDU>, austin at bucsf.bu.edu (Austin Ziegler) writes:
>     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
                                                    ^^^^^^^^^^^^

Just in case you didn't know, strcat works by looking for the null terminator
on the first (target) string, so the null has to be there anyway.

If you do a strcat(str,"\0"), it should be a null operation (do nothing) since
this is the same as strcat(str,"").

If you do a strcat(str,'\0'), you should get a sore dump, or at least
undetermined results (whats at address 0?).

-- 
+-----------------------------------------------------------------------+
| Conor P. Cahill     uunet!virtech!cpcahil      	703-430-9247	!
| Virtual Technologies Inc.,    P. O. Box 876,   Sterling, VA 22170     |
+-----------------------------------------------------------------------+



More information about the Comp.lang.c mailing list