Click here to Skip to main content
15,919,500 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generaldone Pin
followait13-Dec-07 15:26
followait13-Dec-07 15:26 
GeneralDuplicatehandle Pin
vikramlinux11-Dec-07 22:57
vikramlinux11-Dec-07 22:57 
GeneralRe: Duplicatehandle Pin
David Crow13-Dec-07 5:04
David Crow13-Dec-07 5:04 
Generalcheckbox treeview Pin
DevMentor.org11-Dec-07 22:47
DevMentor.org11-Dec-07 22:47 
GeneralRe: checkbox treeview Pin
DevMentor.org12-Dec-07 1:19
DevMentor.org12-Dec-07 1:19 
Generalsimple dialog problem Pin
neha.agarwal2711-Dec-07 22:45
neha.agarwal2711-Dec-07 22:45 
GeneralRe: simple dialog problem Pin
CPallini11-Dec-07 22:54
mveCPallini11-Dec-07 22:54 
GeneralRe: simple dialog problem Pin
ThatsAlok13-Dec-07 0:17
ThatsAlok13-Dec-07 0:17 
GeneralRe: simple dialog problem Pin
David Crow13-Dec-07 5:06
David Crow13-Dec-07 5:06 
Generaltemplate function issue Pin
George_George11-Dec-07 22:39
George_George11-Dec-07 22:39 
GeneralRe: template function issue Pin
Matthew Faithfull11-Dec-07 23:03
Matthew Faithfull11-Dec-07 23:03 
GeneralRe: template function issue Pin
George_George12-Dec-07 0:15
George_George12-Dec-07 0:15 
GeneralRe: template function issue Pin
Matthew Faithfull12-Dec-07 2:51
Matthew Faithfull12-Dec-07 2:51 
GeneralRe: template function issue Pin
George_George12-Dec-07 3:22
George_George12-Dec-07 3:22 
Questionwhat it mean ? Pin
john563211-Dec-07 22:32
john563211-Dec-07 22:32 
AnswerRe: what it mean ? Pin
Cedric Moonen11-Dec-07 22:38
Cedric Moonen11-Dec-07 22:38 
AnswerRe: what it mean ? Pin
ThatsAlok13-Dec-07 0:18
ThatsAlok13-Dec-07 0:18 
Generalcannot convert from 'char *' to 'unsigned short *' Pin
santhoshv8411-Dec-07 21:50
santhoshv8411-Dec-07 21:50 
GeneralRe: cannot convert from 'char *' to 'unsigned short *' Pin
Cedric Moonen11-Dec-07 21:55
Cedric Moonen11-Dec-07 21:55 
GeneralRe: cannot convert from 'char *' to 'unsigned short *' Pin
CPallini11-Dec-07 22:01
mveCPallini11-Dec-07 22:01 
GeneralProblem in Opening HTML file. Pin
sanjeeva K Kanakam11-Dec-07 21:23
sanjeeva K Kanakam11-Dec-07 21:23 
GeneralRe: Problem in Opening HTML file. Pin
Iain Clarke, Warrior Programmer12-Dec-07 1:52
Iain Clarke, Warrior Programmer12-Dec-07 1:52 
Generalatof() losing precision Pin
Andy H11-Dec-07 20:33
Andy H11-Dec-07 20:33 
GeneralRe: atof() losing precision Pin
Cedric Moonen11-Dec-07 21:02
Cedric Moonen11-Dec-07 21:02 
That's because atof returns a float (guess what the 'f' in the function name stands for ?). You could try by using stringstream from the STL:

stringstream ssVal;
double dValue;
ssVal << pszValue;
ssVal >> dValue;


Don't forget to #include <sstream> and to put using namespace std; at the top of your cpp file.


Forget what I say, I wasn't awake Poke tongue | ;-P . If you look at the range of a double, you'll see that the accuracy (here)[^] is 14 or 15 digits. Your string contains much more digits than that. Now, if the number that you want to represent is an integer value, why don't you use an __int64 instead ?
But, I have a question: why do you need such an accuracy, why is it important ? In most of the cases, you won't need that accuracy.


Cédric Moonen
Software developer

Charting control [v1.2]

GeneralRe: atof() losing precision Pin
Llasus11-Dec-07 21:07
Llasus11-Dec-07 21:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.