SIGSEGV (Segmentation Fault) upon setting character in char array (object member var)

John Kiro johnkirollos at gmail.com
Tue Dec 19 14:02:50 UTC 2023


On Tuesday, 19 December 2023 at 14:01:31 UTC, John Kiro wrote:
> Thanks Adam. I agree, the behavior associated with the 
> initialization here is confusing (compared for example to a 
> similarly-looking code in Java). Also I don't get why an array 
> of characters would be considered as an immutable array of 
> characters (that is a **string**). I agree this could be a 
> compiler bug, specially that it's not caught by the compiler.

I mean: specially that **attempting to update it** is not caught 
by the compiler.


More information about the Digitalmars-d-learn mailing list