Click here to Skip to main content
15,893,588 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: what does the MapViewOfFile do exactly?? Pin
Niklas L12-Sep-05 3:06
Niklas L12-Sep-05 3:06 
GeneralRe: what does the MapViewOfFile do exactly?? Pin
namaskaaram12-Sep-05 4:02
namaskaaram12-Sep-05 4:02 
GeneralRe: what does the MapViewOfFile do exactly?? Pin
Niklas L12-Sep-05 4:24
Niklas L12-Sep-05 4:24 
GeneralRe: what does the MapViewOfFile do exactly?? Pin
Chintoo72312-Sep-05 6:01
Chintoo72312-Sep-05 6:01 
GeneralRe: what does the MapViewOfFile do exactly?? Pin
namaskaaram12-Sep-05 17:11
namaskaaram12-Sep-05 17:11 
QuestionCreate child process Pin
whofmans12-Sep-05 0:29
whofmans12-Sep-05 0:29 
AnswerRe: Create child process Pin
David Crow12-Sep-05 3:13
David Crow12-Sep-05 3:13 
QuestionProblems with .NET double data type Pin
sirtimid12-Sep-05 0:11
sirtimid12-Sep-05 0:11 
I am developing an MFC application on the .NET compiler.
When I use atof function to convert a string to double value the compiler changes the decimal part of the result.
When I try to add two doubles the compiler does the same.
Below there is a simple example that I tried with the results I got:

example 1:

char str[11];
memset(str,0x00,11);
memcpy(str,"1234567.89",10);
double a = atof(str);

Output : a = 1234567.8899999999
--------------------------------

example 2

double a=1234567;
double b=0.89;
double d = a + b;

Output : a = 1234567.8899999999


Does anyone know why does this happen and what can I do to make it work properly?

Thanks in Advance

sirtimid

AnswerRe: Problems with .NET double data type Pin
toxcct12-Sep-05 0:18
toxcct12-Sep-05 0:18 
GeneralRe: Problems with .NET double data type Pin
sirtimid12-Sep-05 0:42
sirtimid12-Sep-05 0:42 
GeneralRe: Problems with .NET double data type Pin
toxcct12-Sep-05 1:44
toxcct12-Sep-05 1:44 
GeneralRe: Problems with .NET double data type Pin
sirtimid12-Sep-05 21:54
sirtimid12-Sep-05 21:54 
GeneralRe: Problems with .NET double data type Pin
Maximilien12-Sep-05 3:04
Maximilien12-Sep-05 3:04 
QuestionHow to trap as soon as some Windows app of the same computer sends a print job to the network printer server? Pin
wangdave12-Sep-05 0:05
wangdave12-Sep-05 0:05 
Questionsingleton for a parent with protected destructor Pin
yccheok12-Sep-05 0:02
yccheok12-Sep-05 0:02 
AnswerRe: singleton for a parent with protected destructor Pin
Axter12-Sep-05 0:34
professionalAxter12-Sep-05 0:34 
QuestionAbout System Menu == Plz Help Urgent Pin
parims11-Sep-05 23:44
parims11-Sep-05 23:44 
AnswerRe: About System Menu == Plz Help Urgent Pin
toxcct12-Sep-05 0:15
toxcct12-Sep-05 0:15 
AnswerRe: About System Menu == Plz Help Urgent Pin
ThatsAlok12-Sep-05 23:56
ThatsAlok12-Sep-05 23:56 
Questionvb to c++ Pin
Barm11-Sep-05 22:58
Barm11-Sep-05 22:58 
AnswerRe: vb to c++ Pin
S Douglas12-Sep-05 1:50
professionalS Douglas12-Sep-05 1:50 
AnswerRe: vb to c++ Pin
David Crow12-Sep-05 3:45
David Crow12-Sep-05 3:45 
Questionwatching unicode strings during debugging Pin
Chintoo72311-Sep-05 22:50
Chintoo72311-Sep-05 22:50 
AnswerRe: watching unicode strings during debugging Pin
Manfred Staiger11-Sep-05 23:19
Manfred Staiger11-Sep-05 23:19 
GeneralRe: watching unicode strings during debugging Pin
Chintoo72311-Sep-05 23:46
Chintoo72311-Sep-05 23:46 

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.