I have structure like below
typedef struct { int a; int b; int c; } my_struct; and in another file I have declared a variable of this my_struct type, like below.
my_struct strct_arr[MAX]; Where MAX is a macro which is a configurable value that is a multiple of 18 (18 or 36 or 54 and so on.. it may go up to 18*n times).
I have to initialize the structure with {0xff,0,0}. So, how to initialize whole array of structure my_struct strct_arr[MAX]; with my initial values without using any kind of loops.
I am expecting the output as below:
my_struct strct_arr[MAX]={ {0xff,0,0}, {0xff,0,0}, {0xff,0,0}, {0xff,0,0}, … }; But without knowing MAX value, how to initialize it?
#ifdefs.memset?