Re: [C] strlen, strcat and malloc
From: Alwyn (dt015a1979_at_mac.com.invalid)
Date: 07/30/04
- Next message: Chris Val: "Re: Why Doesn't C++ Accept This OFFSTREAM VECTOR?"
- Previous message: Edo: "Re: compiling error"
- In reply to: Arthur J. O'Dwyer: "Re: [C] strlen, strcat and malloc"
- Next in thread: Fatted: "Re: [C] strlen, strcat and malloc"
- Reply: Fatted: "Re: [C] strlen, strcat and malloc"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 30 Jul 2004 02:10:14 +0100
In article
<Pine.LNX.4.60-041.0407291146130.28809@unix42.andrew.cmu.edu>, Arthur
J. O'Dwyer <ajo@nospam.andrew.cmu.edu> wrote:
> More usefully: The /first/ strcat produces undefined behavior.
> The OP originally had
>
> a = malloc(foo);
> strcat(a, bar);
The OP has been doing this kind of thing since I joined this newsgroup,
despite repeatedly having his mistakes explained to him.
Fatted, move on to Python or Ruby or a myriad other languages I could
mention. Their string handling is a lot more intuitive and elegant.
Alwyn
- Next message: Chris Val: "Re: Why Doesn't C++ Accept This OFFSTREAM VECTOR?"
- Previous message: Edo: "Re: compiling error"
- In reply to: Arthur J. O'Dwyer: "Re: [C] strlen, strcat and malloc"
- Next in thread: Fatted: "Re: [C] strlen, strcat and malloc"
- Reply: Fatted: "Re: [C] strlen, strcat and malloc"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|