Why isn't my dynamic array method doesn't work for this type?
rempas
rempas at tutanota.com
Thu May 5 20:23:40 UTC 2022
On Thursday, 5 May 2022 at 11:49:29 UTC, vit wrote:
>
> ```d
> this.capacity += DEF_VEC_REALLOC_SIZE;
> //realloc(this.ptr, T.sizeof * DEF_VEC_REALLOC_SIZE);
> this.ptr = realloc(this.ptr, T.sizeof * this.capacity);
> //<<--
> ```
Oh, right! I forgot to say it. I'm using my own `realloc` and not
the one from libc. So, the `realloc` function is not the problem
here.
More information about the Digitalmars-d-learn
mailing list