Click here to Skip to main content
15,913,685 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Example on creating an item identifier list Pin
Chris Meech15-Mar-06 2:37
Chris Meech15-Mar-06 2:37 
AnswerRe: Example on creating an item identifier list Pin
Graham Bradshaw14-Mar-06 12:05
Graham Bradshaw14-Mar-06 12:05 
GeneralRe: Example on creating an item identifier list Pin
Chris Meech15-Mar-06 2:40
Chris Meech15-Mar-06 2:40 
QuestionProblem comparing 'double' values Pin
Wheatbread14-Mar-06 9:23
Wheatbread14-Mar-06 9:23 
AnswerRe: Problem comparing 'double' values Pin
Maximilien14-Mar-06 10:06
Maximilien14-Mar-06 10:06 
GeneralRe: Problem comparing 'double' values Pin
Wheatbread14-Mar-06 10:52
Wheatbread14-Mar-06 10:52 
GeneralRe: Problem comparing 'double' values Pin
Maximilien14-Mar-06 12:49
Maximilien14-Mar-06 12:49 
GeneralRe: Problem comparing 'double' values Pin
DRHuff14-Mar-06 17:33
DRHuff14-Mar-06 17:33 
Not that I know of. I have a function called

bool DoublesAreEqual(d1, d2, tol)
{
if (fabs(d1 - d2) < tol)
return true;

return false;
}

which does the job. It has the added advantage of allowing you to test to the tolerance you want so if you only need to compare to 2 decimal places you can.

This is a holdover from ancient C days so there may be a better way to do it with operator overloading.


Any one else have a suggestion? Big Grin | :-D


I'm pretty sure I would not like to live in a world in which I would never be offended.

I am absolutely certain I don't want to live in a world in which you would never be offended.




Dave
Questionextending desktop window Pin
Manu_8114-Mar-06 7:09
Manu_8114-Mar-06 7:09 
Questionvery slow to open a file in huge directory Pin
mk_le14-Mar-06 6:58
mk_le14-Mar-06 6:58 
AnswerRe: very slow to open a file in huge directory Pin
Maximilien14-Mar-06 7:03
Maximilien14-Mar-06 7:03 
GeneralRe: very slow to open a file in huge directory Pin
mk_le14-Mar-06 7:05
mk_le14-Mar-06 7:05 
GeneralRe: very slow to open a file in huge directory Pin
Maximilien14-Mar-06 7:12
Maximilien14-Mar-06 7:12 
GeneralRe: very slow to open a file in huge directory Pin
mk_le14-Mar-06 7:13
mk_le14-Mar-06 7:13 
GeneralRe: very slow to open a file in huge directory Pin
Maximilien14-Mar-06 7:36
Maximilien14-Mar-06 7:36 
AnswerRe: very slow to open a file in huge directory Pin
hint_5414-Mar-06 14:02
hint_5414-Mar-06 14:02 
Questionvery slow when open file from huge directory Pin
mk_le14-Mar-06 6:56
mk_le14-Mar-06 6:56 
AnswerRe: very slow when open file from huge directory Pin
hint_5414-Mar-06 14:03
hint_5414-Mar-06 14:03 
QuestionCompiling Problem Pin
erikamania14-Mar-06 5:53
erikamania14-Mar-06 5:53 
AnswerRe: Compiling Problem Pin
toxcct14-Mar-06 5:58
toxcct14-Mar-06 5:58 
AnswerRe: Compiling Problem Pin
Maximilien14-Mar-06 6:27
Maximilien14-Mar-06 6:27 
AnswerRe: Compiling Problem Pin
hint_5414-Mar-06 14:06
hint_5414-Mar-06 14:06 
QuestionSubclassing ActiveX control Pin
Alton Williams14-Mar-06 5:46
Alton Williams14-Mar-06 5:46 
AnswerRe: Subclassing ActiveX control Pin
Muhammad Azam14-Mar-06 6:29
Muhammad Azam14-Mar-06 6:29 
GeneralRe: Subclassing ActiveX control Pin
Alton Williams14-Mar-06 10:09
Alton Williams14-Mar-06 10:09 

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.