I need to return a structure with a flexible array member from a C function but can\'t figure out why it doesn\'t compile. I know that returning arrays can be achieved by en
struct data_array * test(long length) { struct data_array *a = calloc(1,sizeof(struct data_array) + length*sizeof(double)); a->length = length; return a; }