home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / c / 12582 < prev    next >
Encoding:
Text File  |  1992-08-20  |  1.2 KB  |  42 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!gatech!hubcap!mjs
  3. From: mjs@hubcap.clemson.edu (M. J. Saltzman)
  4. Subject: Re: problems with atof() 
  5. Message-ID: <1992Aug20.180645.13670@hubcap.clemson.edu>
  6. Organization: Clemson University, Clemson SC
  7. References: <1992Aug20.125252.3451@dxcern.cern.ch> <GANESH.92Aug20121638@karp.albany.edu>
  8. Date: Thu, 20 Aug 1992 18:06:45 GMT
  9. Lines: 31
  10.  
  11. In article <GANESH.92Aug20121638@karp.albany.edu> ganesh@cs.albany.edu (Ganesh Murugesan) writes:
  12. >In article <1992Aug20.125252.3451@dxcern.cern.ch> nilo@atdigarfield.cern.ch (Operator) writes:
  13. >
  14. >>   Hello!
  15. >>
  16. >>   I have a problem withe the atof() function, you know string to double 
  17. >>  conversion. 
  18. >>   I can not figure out where the error is, so any help will be really really appreciated.
  19. >>
  20. >
  21. >
  22. >Include  <math.h> and it will work. Else C compiler takes atof
  23.           ^^^^^^^^
  24. Umm, isn't that supposed to be <stdlib.h>?
  25.  
  26. >return value as int by default and hence returns a junk value.
  27. >
  28. >Also may be better to link the math libraary lm while compiling.
  29.  
  30. I don't think this is necessary.
  31.  
  32. >It works if U do these.
  33. >
  34. >Ganesh
  35. >
  36.  
  37.  
  38. -- 
  39.         Matthew Saltzman
  40.         Clemson University Math Sciences
  41.         mjs@clemson.edu
  42.