Check out example codes for "invalid types int int for array subscript c++". It will help you in understanding the concepts better.

Code Example 1

template<int numberOfRows, int numberOfColumns>
void printArray(int (&theArray)[numberOfRows][numberOfColumns])
{
    for(int x = 0; x < numberOfRows; x++){
        for(int y = 0; y < numberOfColumns; y++){
            cout << theArray[x][y] << " ";
        }
        cout << endl;
    }
}

Learn ReactJs, React Native from akashmittal.com