How to create a mutable array of strings?

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


On Sunday, 17 May 2015 at 09:24:19 UTC, anonymous wrote:
> On Sunday, 17 May 2015 at 09:20:17 UTC, Dennis Ritchie wrote:
>> On Sunday, 17 May 2015 at 09:18:15 UTC, Daniel Kozak wrote:
>>> auto s = cast(char[][])["foo", "bar"];
>>
>> Thanks. This version I was completely satisfied.
>
> Remember that Daniel Kozak wrote "if you are sure thats what 
> you really need". I'm confident that you're not sure it's what 
> you need. For starters, this crashes on linux:
>
> ----
> auto s = cast(char[][])["foo", "bar"];
> s[1][1] = 't';
> ----

And no crashes on Windows :)


More information about the Digitalmars-d-learn mailing list