I want to define an array of structs, the first element of which I want to be the offset of this element in the array. It has to be done at compile time. I can auto-generate as one option. I was wondering if there is a simpler way?
my_array[] = { {0, ...}, {1, ...}, ... }
I have some #ifdef
s which remove some items from initialization. So I would like to ignore them if possible, and hence the offset re-adjusted.