Associate information with a pointer address.
bachmeier
no at spam.net
Sun Oct 1 12:21:10 UTC 2023
On Sunday, 1 October 2023 at 09:41:39 UTC, BoQsc wrote:
> The package dependency `emsi_containers` that can be found in
> https://code.dlang.org/packages/emsi_containers might be a
> viable way to resolve the problem.
>
>
>
> ```
> /+dub.sdl:
> dependency "emsi_containers" version="~>0.7"
> +/
> import std;
> void main(string[] args) @nogc
> {
> import containers;
> DynamicArray!int arr;
> arr ~= 1;
> arr ~= 3;
> foreach (e; arr)
> printf("%i",e);
> }
> ```
The HashMap struct matches the associative array you were talking
about earlier. It's been a long time since I looked at it, so I
don't know if it's a complete replacement for the built-in
associative array.
More information about the Digitalmars-d-learn
mailing list