My Struct looks like this:
typedef struct storage {
char ***data;
int lost_index[];
int lost_index_size;
int size;
int allowed_memory_key_size;
int allowed_memory_value_size;
int memory_size;
int allowed_memory_size;
} STORAGE;
The error im getting is "error: flexible array member not at end of struct". Im aware that this error can be solved by moving int lost_index[]
at the end of struct. Why should flexible array member need to be at the end of struct? What is reason?
As this is assumed duplicate of another question, actually i didn't find answers that i actually needed, answers in similar question dont describe the reason which stands behind compiler to throw error i asked about.
Thanks