-
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
-
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...
-
In addition...take a look at the following FAQ...