Associative array and ranges

Nrgyzer nrgyzer at gmail.com
Wed Feb 2 02:11:34 PST 2011


Hey guys,

I have an associative array like this: T[hash_t] myArray; (T means
the template type).

Is there any chance to cast/convert this array to an indexed array or
is it possible to iterate over specific indices? I know that there is
something like next() for the foreach-statement but when the array
contains some thousand instances and I only want iterate over (for
example) 5 elements I think that's the wrong way. It's for a game and
I think every next()-call influences the fps.

I hope there is any solution for my problem :) - Thanks!


More information about the Digitalmars-d-learn mailing list