Explain me some C++ statements

Status
Not open for further replies.

fatma1000

Banned
Joined
Apr 30, 2006
Messages
147
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,298
Location
eygpt
Activity points
0
please explain this steatments step by step

void pren(name,EX,t,fpfix)
{
int t;
char *name,*fpfx[];
float ex[zmax];
FILE *fptr
char string[20];
int i;
double *emat;
emat=(double*)malloc(zmax/2*sizof(double))
for(i=0;i<zmax/2;i++)

emat=(double)ex[2*i];
sprintf(string,"%s%d"%s",fpfix[1],t,".mat")'
fptr=fopen(string,"wb");
savemat(fptr,1000,name,zmax/2,1,0,emat,(double*)0);
dclose(fptr)free(emat);
}
 

Re: help7 c++

void pren(name,EX,t,fpfix) -> wrong definition
{
int t;
char *name,*fpfx[];
float ex[zmax];
FILE *fptr
char string[20];
int i;
double *emat;
emat=(double*)malloc(zmax/2*sizof(double)) -> Why copy from ex to
for(i=0;i<zmax/2;i++)

emat=(double)ex[2*i]; -> ex is not initialized. Did you mean to use EX instead? or to call function exp(2*i)
sprintf(string,"%s%d"%s",fpfix[1],t,".mat")'
fptr=fopen(string,"wb");
savemat(fptr,1000,name,zmax/2,1,0,emat,(double*)0); -> savematr is doing what?
dclose(fptr)free(emat);
}

Regards
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…