How would an experienced programmer declare an associative array of strings that has 2 keys?

My initial impression was string[string][2] my_array; which does not seem to work.

Here is a snippet of the code I am working on:


import std.string;
import std.stdio;


string[string] change(ref string[string] arg_array){
        //..
        arg_array["first"] = strip(readln());
        //..
        arg_array["second"] = strip(readln());
        //..
        return def;
}

void main(){
        string[string][2] test;
        change(string[string] test);
}
        

Reply via email to