This is the mail archive of the
mailing list for the GCC project.
- From: Janis Johnson <janis187 at us dot ibm dot com>
- To: Reinaldo Nolasco Sanches <r_linux at yahoo dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 19 Aug 2002 11:11:13 -0700
- Subject: Re: atof()
- References: <email@example.com>
On Mon, Aug 19, 2002 at 10:49:53AM -0700, Reinaldo Nolasco Sanches wrote:
> I have a problem with atof()... and I don't understand because it...
> When I use atof() to get a value of a string... and put in my double var, the value is not the
> I make a little example...
> #include <stdio.h>
> int main()
> double teste;
> char strteste;
> strcpy( strteste, "120.1" );
> teste = atof( strteste );
> printf( "\n\tResult is = %.2f\n\n", teste );
> return 0;
> and the result is this
> Result is = 1078984704.00
This mailing list is for questions about developing GCC, not about
A hint, though: try compiling with -Wall to turn on more warnings.
- From: Reinaldo Nolasco Sanches