hi, i have to allocate dynamically the vectors in the structure:
typedef struct
{
float *x;
float *y;
float *y2;
int max_val;
}
boxtype;
boxtype box[maxbox];
i would that x,y e y2 must depens by x[n], y[n] e y2 [n] where n is an integer that is passed during program compiling.
this is right way?:
box[1].x = (float*) calloc (n,sizeof(float ));
regards
typedef struct
{
float *x;
float *y;
float *y2;
int max_val;
}
boxtype;
boxtype box[maxbox];
i would that x,y e y2 must depens by x[n], y[n] e y2 [n] where n is an integer that is passed during program compiling.
this is right way?:
box[1].x = (float*) calloc (n,sizeof(float ));
regards
Comment