gtkid_1990 Asdasd gtkid_1990 Asdasd - 9 days ago 4
C Question

Array of an array in Arduino

I am having trouble with creating an array of arrays. Here is my code for the program:

const unsigned char one[] PROGMEM = {

};

const unsigned char two[] PROGMEM = {

};
const unsigned char three[] PROGMEM = {

};
const unsigned char four[] PROGMEM = {

};
const unsigned char five[] PROGMEM = {

};
const unsigned char six[] PROGMEM = {

};
const unsigned char seven[] PROGMEM = {

};
const unsigned char eight[] PROGMEM = {

};
const unsigned char nine[] PROGMEM = {

};

const unsigned char array[] PROGMEM = {const unsigned char one[],const unsigned char two[],const unsigned char three[],const unsigned char four[],const unsigned char five[],const unsigned char six[],const unsigned char seven[],const unsigned char eight[],const unsigned char nine[]};


Also in my void setup for another function:

const void make(int x, int y,const unsigned char array[], 67,67){


It is giving me weird errors such as:

Mattplztestit:17: error: expected identifier before numeric constant
Mattplztestit:17: error: expected ',' or '...' before numeric constant
Mattplztestit:178: error: expected identifier before numeric constant
Mattplztestit:178: error: expected ',' or '...' before numeric constant
Mattplztestit.ino: In function 'const void make(int, int, const unsigned char*, int)':
Mattplztestit:179: error: expected initializer before '<=' token
Mattplztestit:179: error: expected ';' before '<=' token
Mattplztestit:179: error: expected primary-expression before '<=' token
Mattplztestit.ino: In function 'void constr(int)':
Mattplztestit:193: error: too many arguments to function 'const void make(int, int, const unsigned char*, int)'
Mattplztestit.ino:178:12: note: declared here
Mattplztestit:194: error: expected ';' before '}' token


expected identifier before numeric constant

Can anybody please help?

Thankyou

Answer

You should change const unsigned char array[] To const unsigned char