Allocating an empty non null associative arary
Mike Parker
aldacron at gmail.com
Tue Mar 31 05:17:13 UTC 2020
On Tuesday, 31 March 2020 at 02:51:11 UTC, Superstar64 wrote:
> I want to be modify an associative array by reference from
> another function. However null associative arrays are pass by
> value. How do I generically create an empty associative array?
> ---
> import std.stdio;
>
>
> void addElement(int[int] data){
> data[0] = 0;
> }
void addElement(ref int[int] data){
data[0] = 0;
}
More information about the Digitalmars-d-learn
mailing list