Hello forum, a simple syntax question.
I have a two dimensional array which I can both declare and initialise simultaneously like so:
int joystick1[2][3] = {{0, 1023, 0},
** {0, 1023, 0}};** // this works
I 'd like to separate this into two separate statements, like:
int joystick1[2][3]; // this works
and something like:
joystick1 = {{0, 1023, 0},
** {0, 1023, 0}};** // Aargh!!!
which always crashes and burns with:
"error: expected constructor, destructor, or type conversion before '=' token"
So, does anyone know if I can initialise an already declared array using the {blah, blah, blah...} syntax as opposed to having to fill it in by hand, element by element?