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?