Comparison of two 'dynamic arrays'.
Siarhei Siamashka
siarhei.siamashka at gmail.com
Sun Nov 13 16:14:03 UTC 2022
On Sunday, 13 November 2022 at 15:45:40 UTC, DLearner wrote:
> ```D
> struct test_struct {
> char[] Txt;
> }
> test_struct[] A;
> auto B = A.dup;
> ```
But A is not an `int[]` in your new example. You need a "deep
copy" and I can see that similar questions had been asked in this
forum before:
https://forum.dlang.org/thread/yzvcyyqadpttqvtiefhn@forum.dlang.org
Maybe you can add a copy constructor to your struct, which would
dup Txt?
More information about the Digitalmars-d-learn
mailing list