Re: strcat unter FreeBSD

From: Klaus Herrmann <Klaus.Herrmann(at)gmx.net>
Date: Wed, 28 Jul 1999 10:49:37 +0200

> The strcat() and strncat() functions append a copy of the null-terminated
> string append to the end of the null-terminated string s, then add a ter-
> minating `\0'. The string s must have sufficient space to hold the re-
> sult. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> ^^^^^
>
> char s[12] = "Hello";
>
> und so weiter sollte gehen.

thx, geht. ich war dann wohl doch bloß von der grausamen gutmütigkeit
von dos irritiert...
jetzt ist alles klar.

>
> Ausserdem ist der Speicherbereich unter dem "Hello" abgelegt wird
> bei Deiner Varaiante nicht notwendigerweise ueberhaupt schreibbar,
> bin jetzt aber zu faul rauszukramen, wie gcc unter BSD das macht.
das versteh ich nicht. Wieso nicht schreibbar? es ist doch char* und
nicht const char*, und dann werde ich wohl auf meinen eigenen speicher
schreiben dürfen, oder?
(getestet: Praktisch geht's schon, was allerdings die frage nicht klärt
;-)

Danke,
        Klaus

--
Individualists unite!
  Klaus Herrmann
 email: klaus.herrmann(at)gmx.net
 http://linuxlover.notrix.de
To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org
with "unsubscribe de-bsd-questions" in the body of the message
Received on Wed 28 Jul 1999 - 11:10:22 CEST

search this site