On 03/21/2012 11:29 AM, H. S. Teoh wrote: > A question was asked on the d-learn forum about why this throws a > RangeError: > > int[string][int] map; > map["abc"][20]++;
Hey! That syntax is following the broken syntax of C and C++. ;)
This works:
import std.stdio;
void main()
{
int[string][int] map;
map[20]["abc"]++;
writeln(map);
}
The output:
[20:["abc":1]]
Ali
