Redeclaring multidimensional variables

Here is my code:

int matrix[7][5] = {
{1,0,0,0,0},
{1,0,0,0,0},
{1,0,0,0,0},
{1,0,0,0,0},
{1,0,0,1,1},
{1,0,0,0,0},
{1,1,1,1,1}
};

It works fine on it's own. I can pass it to a function and it works. However, if I try to redeclare the variable:

int matrix[7][5] = {
{1,0,0,0,0},
{1,0,0,0,0},
{1,0,0,0,0},
{1,0,0,0,0},
{1,0,0,1,1},
{1,0,0,0,0},
{1,1,1,1,1}
};

matrix[7][5] = {
{1,0,0,0,0},
{1,0,0,0,0},
{1,0,0,0,0},
{1,0,0,0,0},
{1,0,0,1,1},
{1,0,0,0,0},
{1,1,1,1,1}
};

I get errors:

matrix.cpp: In function 'void loop()':
matrix:122: error: expected primary-expression before '{' token
matrix:122: error: expected ;' before '{' token matrix:135: error: expected }' at end of input

How can I fix this?

You can't redeclare an array. There is no such thing as redeclare.
You could call the first one 'matrix1' and the second 'matrix2'.
You also forgot the 'int' with the second matrix.

The initial value of a variable is set before the setup() function is called. This is done just once.
If you want to change the value in you program, you have to use program code.
Like so: matrix[3][4] = 1;

You can only use that format for assigning variables when you are initially declaring the variable.

To change the content you will have to assign new values to the individual elements.

Krodal:
You can't redeclare an array. There is no such thing as redeclare.
You could call the first one 'matrix1' and the second 'matrix2'.
You also forgot the 'int' with the second matrix.

The initial value of a variable is set before the setup() function is called. This is done just once.
If you want to change the value in you program, you have to use program code.
Like so: matrix[3][4] = 1;

I think a better word would be "redefine". I already declared the variable, and I want to change it's value.

Well if there is no way to change the value, could I pass an array directly to a function?

Well if there is no way to change the value

Of course you can change the values, just not all at once.

could I pass an array directly to a function?

Of course. For what purpose, though?

if you call them matrix1 and matrix2, you can pass a pointer (to one of the matrixes) to a function.

PaulS:

Well if there is no way to change the value

Of course you can change the values, just not all at once.

could I pass an array directly to a function?

Of course. For what purpose, though?

5x7 LED matrix multiplexing. How can I pass an array as a function parameter without creating an additional variable for the array?

How can I pass an array as a function parameter without creating an additional variable for the array?

You can pass an array to a function quite easily.

  int matrix[7][5] = {
    {1,0,0,0,0}, 
    {1,0,0,0,0}, 
    {1,0,0,0,0}, 
    {1,0,0,0,0}, 
    {1,0,0,1,1},
    {1,0,0,0,0}, 
    {1,1,1,1,1}
  };

int someFun(int arr[7][5], int val)
{
   // Do something with arr and val...
}

void loop()
{
   // Call the function
   int result = someFun(matrix, 8);
}

Without creating another variable, in the function's parameter list? Impossible, unless the function is to modify a global variable.