c - Scanning values from file using fscanf -


hey need read data file , print it(i have use fscanf). code works first value when add more it's not working. here code

char name[5];    //this value fixed size char isworking; double latitude;  //the length may vary double longitude; //the length may vary while(fscanf(fp2,"%s %c %lf %lf",name,isworking,latitude,longitude) == 4)  {  printf("\n%s %c %lf %lf",id,type,latitude,longitude);  i++;  } 

my file looks that

bob1 y 122.232323 -9.323232 bob2 n 9.0001 -9.001 

it doesn't print except when remove other values , try read name


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -