Here is my structure and array combination.
I tried to defined by many ways and got some errors regarding braces.
Here is one of error i got.
How to define this structure of array?
Code:
typedef struct
{
uint16_t states[4];
}abc;
typedef struct
{
abc dir[2];
}table_t;
table_t array[6] ={};
Here is one of error i got.
Code:
error: extra brace group at end of initializer
{1,2,3,4}
^
error: (near initialization for 'ct[0].dir[0]')
warning: excess elements in struct initializer
warning: (near initialization for 'ct[0].dir[0]')
error: extra brace group at end of initializer
{1,2,3,4}
How to define this structure of array?