Re: [OT] An array of C-Strings
Re: [OT] An array of C-Strings
- Subject: Re: [OT] An array of C-Strings
- From: Sam Goldman <email@hidden>
- Date: Sat, 26 Jan 2002 20:47:31 -0800
On 1/26/02 8:40 PM, "Brian Luft" <email@hidden> wrote:
>
Bad! Very bad!
Sorry :(
>
No where in there did you ever allocate any memory for that array, so just
>
writing to indices into it are clobbering memory you don't own. The SIGBUS
>
is caused because you wrote into memory you don't own.
>
>
If you don't mind using STL, the nicest way I know of doing it is the
>
following:
>
<snip>
>
It's not so nice if you don't want to use STL.
>
>
Hope that helps. Brian
Thank you, that worked and does exactly what I wanted.
- Sam