Hi,I have an associative array of type int[ulong] and I'm trying to get the index of the maximum value, like this:
int[ulong] aa = [1UL: 2000, 2UL: 5000, 5UL: 1000]; writeln(aa.maxIndex); // should print 2 Can anyone help me out? Many thanks, Lyle
Lyle via Digitalmars-d-learn Tue, 30 May 2017 11:01:40 -0700
Hi,I have an associative array of type int[ulong] and I'm trying to get the index of the maximum value, like this:
int[ulong] aa = [1UL: 2000, 2UL: 5000, 5UL: 1000]; writeln(aa.maxIndex); // should print 2 Can anyone help me out? Many thanks, Lyle