invalid types int int for array subscript c++

C++
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;
    }
}
Source

Also in C++: