#include <cstddef>
#include <iostream>
using namespace std;

template<size_t N, size_t M>
void printPtr( int(&A)[M][N]) {
   for(int i=0; i < M; i++){
        for(int j=0; j<N; j++) {
            cout << A[i][j] << " ";
        }
        cout << endl;
    }
}

int main() {

    int A[][3] = {
			{ 1, 2, 3 },
			{ 4, 5, 6 },
			{ 7, 8, 9 },
			{ 10, 11, 12 }
	};
    
	int(*ptrA)[4][3] = &A; // Not a decayed type
	printPtr(*ptrA);
	printPtr(A);
}