string literals

bearophile bearophileHUGS at lycos.com
Sat Jan 26 12:26:18 PST 2008


Milke Wey:
> On linux you would get an nice Segfault when running that code.

Ah, thank you then. I have thought that's true only for string literals assigned to static arrays:

void main() {
    char[3] str = "abc";
    str[0] = 'b';
}

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list