Multi-dimensional arrays
typedef int arraytype [2][3]; // is this stylish? or
const int NumRow = 2;
const int NumCol = 3;
typedef int ArrayType [NumRow][NumCol]; // or is this?
Usage with initialization:
ArrayType X = {2,3,4,5};
Reference : X[1][2] = X[1][2] + X[1][1];
Previous slide
Next slide
Back to first slide
View graphic version