How to create a mutable array of strings?

Dennis Ritchie via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun May 17 02:42:59 PDT 2015


On Sunday, 17 May 2015 at 09:36:33 UTC, anonymous wrote:
> On Sunday, 17 May 2015 at 09:26:15 UTC, Dennis Ritchie wrote:
>> And no crashes on Windows :)
>
> Yeah, on windows it's even worse.
>
> void main()
> {
>     auto s = cast(char[][])["foo", "bar"];
>     s[1][1] = 't';
>     import std.stdio;
>     writeln("bar");
> }

Yes exactly.


More information about the Digitalmars-d-learn mailing list