Click here to Skip to main content
15,887,214 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: C++ Directory Functions Pin
gamefreak229120-Apr-09 17:01
gamefreak229120-Apr-09 17:01 
QuestionRe: C++ Directory Functions Pin
David Crow20-Apr-09 17:37
David Crow20-Apr-09 17:37 
AnswerRe: C++ Directory Functions Pin
gamefreak229120-Apr-09 18:16
gamefreak229120-Apr-09 18:16 
AnswerRe: C++ Directory Functions Pin
krmed21-Apr-09 3:03
krmed21-Apr-09 3:03 
QuestionWhat I should Use...bitset, vector &LT bool&GT, or bit_vector? Pin
JohnnyG20-Apr-09 13:51
JohnnyG20-Apr-09 13:51 
AnswerRe: What I should Use...bitset, vector &LT bool&GT, or bit_vector? Pin
Stuart Dootson20-Apr-09 20:07
professionalStuart Dootson20-Apr-09 20:07 
GeneralRe: What I should Use...bitset, vector &LT bool&GT, or bit_vector? Pin
JohnnyG21-Apr-09 11:18
JohnnyG21-Apr-09 11:18 
Questionsprintf and rounding issues [modified] Pin
Jim Crafton20-Apr-09 8:27
Jim Crafton20-Apr-09 8:27 
I've noticed that sprintf() does some interesting things with the numbers, for example:

double : 8.38750000 sprintf: 8.387

double : 9.23750000 sprintf: 9.238

The final sprintf() was achieved with code like this:
double d = 9.23750000;
sprintf( tmp, "%0.3f", d );


In the case of 8.3875, no rounding appears to taking place. In the case of 9.2375, we get rounding! Is this normal? Is there a way to prevent this?

Bah humbug, it helps to actually examine the damn number more closely. Never mind!


Thanks to everyone who answered below!


¡El diablo está en mis pantalones! ¡Mire, mire!
SELECT * FROM User WHERE Clue > 0
0 rows returned

Save an Orange - Use the VCF!
VCF Blog
Just Say No to Web 2 Point Oh


modified on Monday, April 20, 2009 4:41 PM

AnswerRe: sprintf and rounding issues Pin
Stuart Dootson20-Apr-09 8:57
professionalStuart Dootson20-Apr-09 8:57 
AnswerRe: sprintf and rounding issues Pin
Luc Pattyn20-Apr-09 9:20
sitebuilderLuc Pattyn20-Apr-09 9:20 
AnswerRe: sprintf and rounding issues Pin
CPallini20-Apr-09 10:38
mveCPallini20-Apr-09 10:38 
QuestionText in OpenGL Pin
yousuf_227920-Apr-09 8:12
professionalyousuf_227920-Apr-09 8:12 
AnswerRe: Text in OpenGL Pin
Stuart Dootson20-Apr-09 8:24
professionalStuart Dootson20-Apr-09 8:24 
GeneralRe: Text in OpenGL Pin
yousuf_227920-Apr-09 8:31
professionalyousuf_227920-Apr-09 8:31 
GeneralRe: Text in OpenGL Pin
yousuf_227920-Apr-09 8:34
professionalyousuf_227920-Apr-09 8:34 
GeneralRe: Text in OpenGL Pin
Stuart Dootson20-Apr-09 8:43
professionalStuart Dootson20-Apr-09 8:43 
QuestionHeap Memory / COM Object Limits Pin
Steve Thresher20-Apr-09 6:50
Steve Thresher20-Apr-09 6:50 
QuestionExecuting Code on C++ API Exit Pin
turkmeistr120-Apr-09 5:53
turkmeistr120-Apr-09 5:53 
QuestionRe: Executing Code on C++ API Exit Pin
David Crow20-Apr-09 5:57
David Crow20-Apr-09 5:57 
AnswerRe: Executing Code on C++ API Exit Pin
turkmeistr120-Apr-09 6:23
turkmeistr120-Apr-09 6:23 
GeneralRe: Executing Code on C++ API Exit Pin
David Crow20-Apr-09 8:07
David Crow20-Apr-09 8:07 
GeneralRe: Executing Code on C++ API Exit Pin
turkmeistr120-Apr-09 9:07
turkmeistr120-Apr-09 9:07 
Questionchar array issues Pin
gamefreak229120-Apr-09 5:07
gamefreak229120-Apr-09 5:07 
QuestionRe: char array issues Pin
David Crow20-Apr-09 5:15
David Crow20-Apr-09 5:15 
AnswerRe: char array issues Pin
gamefreak229120-Apr-09 6:02
gamefreak229120-Apr-09 6:02 

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.