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
As to the reason why you cannot convert double* to double[], you may refer to this question that was asked before.
double*
double[]
As to solve the problem, changing double data[]; to double *data; will work.
double data[];
double *data;
New UPDATE:
double* b = malloc(sizeof(double) * 1000);