C language - Fscanf and sprint commands in unix environment
- by yanag
I am trying to read file with 30 rows and 5 columns with separator of "tab". Each time I get only part of the rows.
In the windows environment it's working good. Any idea why in unix it is not working?
while (fscanf(FFMapFile,"%s\t%s\t%s\t%s\t%s\t",fnfMap[i].COS_ID,fnfMap[i].FF_First_Act,fnfMap[i].FF_Next_Act,fnfMap[i].Free_FF_allowed,fnfMap[i].FF_Change_Charge)!=EOF)
{
sprintf(s,"%s\t%s\t%s\t%s\t%s\t",fnfMap[i].COS_ID,fnfMap[i].FF_First_Act,fnfMap[i].FF_Next_Act,fnfMap[i].Free_FF_allowed,fnfMap[i].FF_Change_Charge);
error_log(s,ERROR);
i++; }