CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Atof

  1. #1
    Join Date
    Aug 2003
    Posts
    938

    Atof

    helllo
    i got a problme wiht atof....i use it to convert a char to double and i get zero always here is teh code:
    Code:
    //takse the argumnet and converts it....
    //type of the argumnet is ->    char **argv  )
    number=atof(argv[3]); 
    //number here is always zero...while if i output argv[3] it will give me teh correct number....
    any ideas?
    also dint want to make another thread....
    but switch doesn't that the char **argv ?
    thx in advnace

  2. #2
    Join Date
    Mar 2004
    Location
    Israel
    Posts
    638
    More details please. Its hard to tell where the problem is.
    which arguments did you use for input? post the code and how you run the program.

    Just to show you that we need more information:
    an argument for argv[3] might be a value between 0.0 and 0.999 (as string of course) - while 'number' is declared as an integer...
    **** **** **** **** **/**

  3. #3
    Join Date
    May 2000
    Location
    KY, USA
    Posts
    18,652
    In addition...take a look at the following FAQ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured