problem with code

[code]
FILE *fp1;
int i,ctr,j,eof_chk,k,l;
double X[3291][26];
char c;

zf=(double **)malloc(nobs*sizeof(double *));
for(i=0;i<nobs;i++)
zf[i]=(double *)malloc(ninst_f*sizeof(double));


zg=(double **)malloc(nobs*sizeof(double *));
for(i=0;i<nobs;i++)
zg[i]=(double *)malloc(ninst_g*sizeof(double));

zl=(double **)malloc(nobs*sizeof(double *));
for(i=0;i<nobs;i++)
zl[i]=(double *)malloc(ninst_l*sizeof(double));

/*Reading data into the data matrix*/
fp1=fopen("gmm_data_new.csv","r");

for(i=0;c!='
';i++)
{
fscanf(fp1,"%c",&c);
if(c==',')
ctr++;
}
[/code]

this gives a debug assertion failed error..expression STREAM!=NULL

any idea whats wrong?

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories