Click here to Skip to main content
15,912,504 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Shareable objects... Pin
BlackSmith12-Feb-03 9:48
BlackSmith12-Feb-03 9:48 
GeneralRe: Shareable objects... Pin
palbano12-Feb-03 11:58
palbano12-Feb-03 11:58 
GeneralRe: Shareable objects... Pin
Chris Richardson12-Feb-03 11:58
Chris Richardson12-Feb-03 11:58 
QuestionCan I add a menu to a dialog based application? Pin
work_to_live12-Feb-03 8:48
work_to_live12-Feb-03 8:48 
AnswerRe: Can I add a menu to a dialog based application? Pin
Chris Losinger12-Feb-03 8:52
professionalChris Losinger12-Feb-03 8:52 
GeneralRe: Can I add a menu to a dialog based application? Pin
work_to_live12-Feb-03 9:05
work_to_live12-Feb-03 9:05 
GeneralCImage & Transparency Pin
loading12-Feb-03 8:01
loading12-Feb-03 8:01 
QuestionReliable way to convert float to a double? Pin
Member 9612-Feb-03 7:40
Member 9612-Feb-03 7:40 
What is the most reliable way to convert a float variable to a double variable?

The reason I ask is this:

float fData=2.7;<br />
double dData=fData;


After the above operation dData is: 2.7000000476837158
not 2.7

I know this is probably due to some problem with .7 being represented accurately in binary. How do I ensure that 2.7 float = 2.7 double without resorting to string based conversions and truncating etc?
AnswerRe: Reliable way to convert float to a double? Pin
Chris Losinger12-Feb-03 7:51
professionalChris Losinger12-Feb-03 7:51 
GeneralRe: Reliable way to convert float to a double? Pin
Member 9612-Feb-03 8:10
Member 9612-Feb-03 8:10 
GeneralRe: Reliable way to convert float to a double? Pin
Chris Losinger12-Feb-03 8:20
professionalChris Losinger12-Feb-03 8:20 
GeneralRe: Reliable way to convert float to a double? Pin
Member 9612-Feb-03 8:30
Member 9612-Feb-03 8:30 
GeneralRe: Reliable way to convert float to a double? Pin
Alvaro Mendez12-Feb-03 9:01
Alvaro Mendez12-Feb-03 9:01 
GeneralRe: Reliable way to convert float to a double? Pin
Member 9612-Feb-03 8:41
Member 9612-Feb-03 8:41 
AnswerRe: Reliable way to convert float to a double? Pin
Tim Smith12-Feb-03 7:52
Tim Smith12-Feb-03 7:52 
GeneralRe: Reliable way to convert float to a double? Pin
Member 9612-Feb-03 7:55
Member 9612-Feb-03 7:55 
GeneralRe: Reliable way to convert float to a double? Pin
Stuart Dootson12-Feb-03 8:29
professionalStuart Dootson12-Feb-03 8:29 
GeneralRe: Reliable way to convert float to a double? Pin
Member 9612-Feb-03 8:37
Member 9612-Feb-03 8:37 
GeneralRe: Reliable way to convert float to a double? Pin
Stuart Dootson12-Feb-03 21:55
professionalStuart Dootson12-Feb-03 21:55 
AnswerThis will work, while ugly... Pin
Abin12-Feb-03 16:58
Abin12-Feb-03 16:58 
Generalmodeless dlg question Pin
ns12-Feb-03 7:17
ns12-Feb-03 7:17 
Generalnevermind...thanks Pin
ns12-Feb-03 7:44
ns12-Feb-03 7:44 
GeneralRe: nevermind...thanks Pin
Joan M12-Feb-03 20:12
professionalJoan M12-Feb-03 20:12 
Generalthanks! Pin
ns13-Feb-03 1:43
ns13-Feb-03 1:43 
Generalcatching file changes Pin
Joao Vaz12-Feb-03 6:41
Joao Vaz12-Feb-03 6:41 

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.