I have the following:
inside a text file i have:Code:while(fgetc(bFile) != EOF) { fscanf(bFile, "%s %lf %lf", custName, &totearn, &weekearn); }
sarah 4.4 7.7
john 3.3 8.8
when i run:
printf( "%s %lf %lf\n ", custName, totearn, weekearn);
i get the following:
arah 4.400000 7.700000
john 3.300000 8.800000
john 3.300000 8.800000
Why is the first character in the text skipped ?and why is "john" printed twice?



LinkBack URL
About LinkBacks
and why is "john" printed twice? 



I used to be an adventurer like you... then I took an arrow to the knee.