Getting an odd error trying to initialise an array in C - anyone know why this might happen?
I have a global variable:
static my_type foo[6];
And in an included header file, I have:
typedef uint32_t my_type[5];
I then in a function in the same file as the global variable try to do:
foo = {{1, 2, 3, 4, 5}, {1, 2, 3, 4, 6}, {1, 2, 3, 4, 7}, {1, 2, 3, 4, 8}, {1, 2, 3, 4, 9}, {1, 2, 3, 4, 10}};
The compiler (GCC4) gives the error 'expected expression before '{' token'.
Anyone know what's gone wrong and how to fix it?
Cheers!