array size - columns?

I'm reading someone else's code (which once I understand what it does, I have to rewrite in a different language) and I can't quite figure out what's going on here:

1
2
3
        for(int si=0; si<ArrayName.Size(); si++)
         for(int sj=0; sj<ArrayName[0].Size(); sj++)
          for(int sk=0; sk<ArrayName[0][0].Size(); sk++)


The first line I think gives the size of the array - the total number of elements - from what I could find online. But what do the next two lines give? It's a 3d array.
it means that the array in this language is a class that has member function Size() that returns number of elements in a subarray.
I don't understand the [0] part though.
Like, obviously, ArrayName[1][4][2] is a specific element. But I can't tell in the context of the size, is it asking for the size of the array in the first dimenstion, and then the second?
Let consider declaration in C++

int a[2][3][4];

Expression a[0] is an array of type int[3][4]. Expression of a[0][0] is an array of type int[4].

The same is valid for the code you showed.
Okay. I think I get it. Thanks.
Topic archived. No new replies allowed.