I have
void createMat(int N, double X[][N], double Y[][N]){
for (int x = 0; x < (N / 2); x++) {
for (int y = 0; y < (N / 2); y++) {
X[x][y] = Y[x][y];
}
}
}
and call it in main
createMat(N,A,a);
I do not understand, what is wrong. I create matrix, N is number of rows and columns put by user. A is new matrix, a is the old one.
**main.cpp:19:35: error: use of parameter outside function body before ']' token
void createMat(int N, double X[][N], double Y[][N]){
^
main.cpp:19:36: error: expected ')' before ',' token
void createMat(int N, double X[][N], double Y[][N]){
^
main.cpp:19:38: error: expected unqualified-id before 'double'
void createMat(int N, double X[][N], double Y[][N]){**