I need to make this function. The parameter suppose to be a random N*N
array. And it should returns a (N-1)*(N-1)
array. How can I do this?
int** SubMatrix(int** matrix){
int** submatrix=new int*[size-1];
................................
................................
return submatrix;
}
Is this code correct?
Besides, say in the main function, I already have this array
x={{1,2,3},{1,2,3},{1,2,3}};
How do I call the function?
Calling:
int y[2][2]=SubMatrix[x]
is wrong and
int** y=SubMatrix[x]
is also wrong...