All,
I have a string "3625.5176817405" and I would like to convert this string to double and would like to retain all the digits after the decimal point.
But when I use atof I get 3625.52
wh...
http://www.experts-exchange.com/Programming/Languages/CPP/Q_22111869.html
Zones:
C++Date Answered: 01/05/2007 Grade: B Views: 0
Hi experts, I'm trying to convert a string to a double.
double d = atof("245.76");
The d variable become 245.75999999999999.
I need to have a double 245.76000000000000.
How suggest to f...
http://www.experts-exchange.com/Programming/Languages/CPP/Q_22134470.html
Zones:
C++Date Answered: 01/24/2007 Grade: A Views: 4
Just a simple questions about atof function?
Why and when would you need a function that convert char to double value???
What is the purpose??
Can you explain to me the following 2 programs
giv...
http://www.experts-exchange.com/Programming/Languages/CPP/Q_22714987.html
Zones:
C++,
CDate Answered: 07/30/2007 Grade: A Views: 5
I have a C++ program that reads in a binary string, parses it into character arrays and converts some of them to doubles with atof. It works fine on the Sun Sparcs on which the data is stored. Ho...
http://www.experts-exchange.com/Programming/System/Unix_-_Posix/Q_10009423.html
Hi Experts
Urgent! I'm coding this for my company project-- I'm having some problems with this code:
#include <dos.h>
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <gra...
http://www.experts-exchange.com/Programming/Languages/C/Q_20895687.html
Zones:
CDate Answered: 02/25/2004 Grade: A Views: 4
I'm modifying a C program that executes commands entered by the user over a network. One of the commands has an option whose argument needs to be converted to a double. I'm reading in the argument ...
http://www.experts-exchange.com/Programming/Languages/C/Q_21596608.html
Zones:
CDate Answered: 10/18/2005 Grade: B Views: 0
Hello,
I am having problems with atof(). Here is a code snippet:
getline(cin, sRate);
record[i].rate = atof(sRate);
I need to convert the input sRate to an element of the struct employee...
http://www.experts-exchange.com/Programming/Languages/CPP/Q_21805899.html
Zones:
C++Date Answered: 04/07/2006 Grade: A Views: 9
Hi,
I'm reading some floating pt numbers from a text file using a tokenize method, then converting to double using atof(). For some reason some numbers get rounded a bit off. Like:
"1.60: ...
http://www.experts-exchange.com/Programming/Languages/CPP/Q_22141197.html
Zones:
C++Date Answered: 01/31/2007 Grade: A Views: 0
There are some generic conversion functions.
eg. _ttol will wrap atol and _wtol depending on some defines. However there doesn't seem to be a generic macro to handle the case of atof.
What is ...
http://www.experts-exchange.com/Programming/System/Windows__Programming/MFC/Q_20827006.htm...
Zones:
Windows MFCDate Answered: 12/16/2003 Grade: A Views: 0
in MFC I can do this:
CString s1("1.99")
double num = atof((char *)(const char *) s1);
in winCE I get this error:
error C2664: 'atof' : cannot convert parameter 1 from 'class CString' to 'c...
http://www.experts-exchange.com/Programming/Handhelds_-_PDAs/Windows_Mobile/Q_20909043.htm...