Copying and array into another

pascal111 judas.the.messiah.111 at gmail.com
Tue Aug 9 18:33:04 UTC 2022


I tried to copy an array into another without affecting in the 
original array when I try to change the value of any element of 
the new array, but I failed except with this way in the next code:

'''D
int[] x=[1,2,3];
     int[] y=x.filter!("a==a").array;

     y[1]=800;

     x.writeln;
     y.writeln;
'''


More information about the Digitalmars-d-learn mailing list