Question about mutable arrays
Ellery Newcomer
ellery-newcomer at utulsa.edu
Thu Nov 19 06:42:55 PST 2009
A Bothe wrote:
> Hey guys,
> I've found a problem that occurred since DMD 2.034:
>
> When I've created a dynamic array like
> string[] a;
>
> and I want to assign something via the index of this array
> a[0]="Test";
>
> DMD says the array isn't mutable...even if these are normal types like int or char.
>
> Does anybody knows how to solve this problem?
>
> Thank in advance
a[0] = "Test".dup;
?
More information about the Digitalmars-d-learn
mailing list