home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / c / 12287 < prev    next >
Encoding:
Internet Message Format  |  1992-08-13  |  810 b 

  1. Path: sparky!uunet!cs.utexas.edu!sun-barr!ames!uakari.primate.wisc.edu!caen!uvaarpa!murdoch!kelvin.seas.Virginia.EDU!wsh8z
  2. From: wsh8z@kelvin.seas.Virginia.EDU (William Scott Heyman)
  3. Newsgroups: comp.lang.c
  4. Subject: Another scanf question
  5. Message-ID: <1992Aug13.180241.1810@murdoch.acc.Virginia.EDU>
  6. Date: 13 Aug 92 18:02:41 GMT
  7. Sender: usenet@murdoch.acc.Virginia.EDU
  8. Organization: University of Virginia
  9. Lines: 15
  10.  
  11. I have a list of numbers in a file writen using 
  12.     printf("%f %f\n",a,b); 
  13. many times.
  14. I want to read this list a line at a time using scanf:
  15.     scanf("%f %f\n",&a,&b);
  16. The result is a = b = 0.0 which isn't correct.
  17. I also tried fscanf(stdin,"%f %f\n",&a &b);
  18. to no avail...
  19.  
  20. Could someone suggest a way to read in this list of numbers?
  21. Thanks
  22.  
  23.     Will Heyman
  24.     UVA Applied Math
  25.     wsh8z@virginia.edu
  26.