can you initialise an array of structs, with values when the structure contains a further array?
for example
I have a structure:
Code:
typedef struct PATTERNS
{
int pattern[10];
int num_instructions;
} PAT, *PAT_PTR;
and then i have an array of said structure and i want to initialise the whole bunch with values.
I thought i could go some thing like:
Code:
PAT patternx[2] = {{5, 94, 8, 94, 3, 30, 4, 60, 3, 30}, 5, {5, 94, 8, 94, 3, 30, 4, 60, 3, 30}, 5};
but the compiler complained.
Any suggestions?