range violation

Andrej Mitrovic andrej.mitrovich at gmail.com
Mon Feb 28 13:25:23 PST 2011


That's because data2 has length 1000, each of which has an array of
length 200. Not the other way around. This works:

double[200][1000] data2;

void main()
{
    for(int i = 0; i < 1000; i++) {
        for(int j = 0; j < 200; j++) {
         data2[i][j] = 4.0;
       }
    }
}


More information about the Digitalmars-d-learn mailing list