Thread overview
Error on website.
Feb 06, 2008
Saaa
Feb 07, 2008
Jesse Phillips
Feb 07, 2008
Saaa
February 06, 2008
char[] str;
char[] str1 = "abc";
str[0] = 'b';        // error, "abc" is read only, may crash

Editing str has nothing to do with str1, as far as I know.


February 07, 2008
On Wed, 06 Feb 2008 21:23:06 +0100, Saaa wrote:

> char[] str;
> char[] str1 = "abc";
> str[0] = 'b';        // error, "abc" is read only, may crash
> 
> Editing str has nothing to do with str1, as far as I know.

True, but it fails because str points to nothing.
February 07, 2008

>> char[] str;
>> char[] str1 = "abc";
>> str[0] = 'b';        // error, "abc" is read only, may crash
>>
>> Editing str has nothing to do with str1, as far as I know.
>
> True, but it fails because str points to nothing.
Or, in other words: isn't long enough :)