Hi,

I'm working on a project at the moment and i have run into some trouble.

I have a struct defined as such:

Code:
typedef struct{
	int points;
	float *time, *dhdt, *drate, *diff;
} simData;
then in my main function I have this code:

Code:
simData *data;
data->points = 1800;
data->time = (float *)malloc(points*sizeof(float));
data->dhdt = (float *)malloc(points*sizeof(float));
data->drate = (float *)malloc(points*sizeof(float));
data->diff = (float *)malloc(points*sizeof(float));
Everytime I try and run this code, the program crashes. Can anyone help me unearth why this is happening?