|
-
July 24th, 2004, 12:46 AM
#1
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
-
July 24th, 2004, 02:36 AM
#2
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...
**** **** **** **** **/**
-
July 24th, 2004, 02:42 AM
#3
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|