thanks again..
i follow as what u mentioned ...work..
but after i go into more details to read it into array for processing..program keep out/terminate
Code:
while ((fgets(stemp, MAX, fp1))!=NULL)
{
/* if(p=strchr(stemp,'\n'))!= NULL) */
//if(stemp=='\n')
//printf(">%s<", stemp);
fprintf(fout,"%s",stemp);
line++;
//printf("%d", line);
if(line>=4)
{
sscanf(stemp, "%s %s %s %s %s %s", &cname[arr], &id[arr] ,&age[arr], &sex[arr], &type[arr],&amt[arr]);
printf("\n >%s< >%s< >%s< >%s< >%s< >%s<",cname[arr],id[arr],age[arr],sex[arr],type[arr],amt[arr]);
arr++;
}
}
set=0;
printf("\n >%s< >%s< >%s< >%s< >%s< >%s<",cname[set],id[set],age[set],sex[set],type[set],amt[set]); /* try to check and print out the specific array contents */
just curious...for sscanf...those data can not read into &field?