home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / c / 19066 < prev    next >
Encoding:
Internet Message Format  |  1992-12-31  |  910 b 

  1. Path: sparky!uunet!infoserv!celeborn!steve
  2. From: steve@Celeborn.lvunix.com (Steve Slade)
  3. Subject: Re: FP formats not linked
  4. Newsgroups: comp.lang.c
  5. References: <1992Dec30.023547.1076@cpp.uucp>
  6. X-Newsreader: TIN [version 1.1 PL8]
  7. Message-ID: <steve.00nf@Celeborn.lvunix.com>
  8. Date: 31 Dec 92 00:25:08 PST
  9. Organization: Not even Close
  10. Lines: 16
  11.  
  12. Rich Bauer (root@cpp.uucp) wrote:
  13. : When scanf goes to get the first batting average in this program,
  14. : the program terminates abnormally with the error message:
  15. : "floating point formats not linked"
  16.  
  17. : What does this mean?  I can't find it in the manuals, and the code
  18. : is correct as far as I can tell.  What's the problem?
  19.  
  20. :     double b_avg[9];
  21. :       scanf("%lf", &b_avg[i]);
  22. Well I'm still learning C my self but I think you have to define b_avg[9]
  23. like this
  24. long double b_avg[9];
  25.  
  26. because scanf is looking for a long double and you declared it has only a 
  27. double.
  28.