# Problem with arrays

I'n trying to make a sketch about a led matrix 8x8 with 2 74hc595 shift register, but i have a problem with one array.
I have several arrays declared like this:

int M[8][8]= {
{0, 1, 1, 1, 0, 1, 1, 1},
{0, 0, 1, 0, 0, 1, 1, 1},
{0, 1, 0, 1, 0, 1, 1, 1},
{0, 1, 0, 1, 0, 1, 1, 1},
{0, 1, 1, 1, 0, 1, 1, 1},
{0, 1, 1, 1, 0, 1, 1, 1},
{0, 1, 1, 1, 0, 1, 1, 1},
{0, 1, 1, 1, 0, 1, 1, 1}
};

and i want to make other array like this:
const int LETRAS=25;
int frase[LETRAS][8][8]={W,W,WW,P,R,A,C,T,I,C,A,N,D,O,A,R,D,U,I,N,OO,C,O,M,SPACE};

but i have this error 200: error: invalid conversion from 'int (*)[8]' to 'int'

If i try this way

int frase[LETRAS][8][8];
frase[0]= M;

i have the follow error: 203: error: invalid array assignment

Does anybody can help me please?

First things first - if all you saving in each element is a 1 or a 0, that's a huge waste of memory.
Make the elements "byte" or better still, pack the bits.

And post your code - use code tags.

int frase[LETRAS][8][8];
frase[0]= M;

You've got two dimensions to that array, but you're only specifying one. That may "work" but it will bite you later.

Your biggest problem is that you are trying to shove a letter in a hole meant for a number. You have an int data type and then try to put M in it.

Maybe you want the ascii representation of M, so you could use 'M'. I'm not real sure what you want to do so I'm not sure how you should change it. But what you've got now is just completely wrong on too many levels to list.

Re-reading it, it isn't just a waste of memory, unless you're running it on a Mega, it's almost certainly more memory than you've got.
So, "byte" rather than "int", and then eventually, you'll be moving the whole lot into PROGMEM.

i want to store in an array 25 matrix 8x8, each matrix position is an integer, so i will have 25 matrix like M (with different digits), so my question is how can i make this?

i want to store in an array 25 matrix 8x8, each matrix position is an integer,

You probably can’t. That would be 3200 bytes, which is more than exists on an Arduino.

If you want to have an array of references to bitmaps, suitable for displaying on dot-matrix displays, that usually comes out
somewhat differently. Keeping with the basics you have now, You could do:

``````typedef byte bitmap[8][8];  // 8x8 map of 0/1 for defining characters.  (64 bytes)
bitmap *mymessage[25];    // 25 pointers to bitmaps  (50 bytes)
``````

More typically, one would pack bits into a sort of font table, stick that in program memory, and index it more-or-less directly from character values:

``````typedef byte bitmap[8];   // 8bits per row by 8 rows
bitmap[128] fonttable = PROGMEM {  ...  // lots and lots of constants. };
:
dotmatrixwrite(char c) {
bitmap * myglyph = &fonttable[c];
for (byte row = 0; row < 8; row++) {