Click here to Skip to main content
15,917,618 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Event watching Pin
prasad_som30-Aug-05 20:18
prasad_som30-Aug-05 20:18 
AnswerRe: Event watching Pin
John R. Shaw30-Aug-05 20:19
John R. Shaw30-Aug-05 20:19 
GeneralRe: Event watching Pin
Nishad S30-Aug-05 20:40
Nishad S30-Aug-05 20:40 
AnswerRe: Event watching Pin
ThatsAlok30-Aug-05 20:51
ThatsAlok30-Aug-05 20:51 
GeneralRe: Event watching Pin
Nishad S30-Aug-05 21:43
Nishad S30-Aug-05 21:43 
QuestionIShellFolder::ParseDisplayName and UNICODE Pin
Tcpip200530-Aug-05 19:43
Tcpip200530-Aug-05 19:43 
AnswerRe: IShellFolder::ParseDisplayName and UNICODE Pin
Jose Lamas Rios31-Aug-05 2:55
Jose Lamas Rios31-Aug-05 2:55 
Questionbugs when type-casting a float to double Pin
chris_mclean30-Aug-05 18:58
chris_mclean30-Aug-05 18:58 
I want to typecast a 32-bit float to a 64-bit double.
When I do, the most significant bits of the mantissa are correct (ie. the original 'float' variable), but the additional mantissa bits provided by the double look like they have not been initialised properly (ie. The complier has provided a 'double' that is no more accurate than the original 32-bit float).

I have had same results using Visual C++6.0 and VisualC++2005beta2
I have searched the MSDN for some light on this, and have found little.

Anyone have any suggestions/recommendations/standard practice to deal with this...


//=========================================================
//Here is some code that demonstrates the problem...
//Step through it with a debugger and examine the values stored in fdArray[]
//=========================================================

int main(void)
{
int i;
float fFloat;
float fArray[] = {0.1,0.2,0.3,0.4};
double fdArray[] = {0.0,0.0,0.0,0.0};

for(i=0;i<4;i++)
{
fFloat = fArray[i];
fdArray[i] = (double) fFloat;
}

return 0;
}
AnswerRe: bugs when type-casting a float to double Pin
Christian Graus30-Aug-05 19:21
protectorChristian Graus30-Aug-05 19:21 
AnswerRe: bugs when type-casting a float to double Pin
John R. Shaw30-Aug-05 20:38
John R. Shaw30-Aug-05 20:38 
GeneralRe: bugs when type-casting a float to double - Resolved Thanks Pin
chris_mclean30-Aug-05 21:08
chris_mclean30-Aug-05 21:08 
GeneralRe: bugs when type-casting a float to double - Resolved Thanks Pin
John R. Shaw31-Aug-05 20:25
John R. Shaw31-Aug-05 20:25 
AnswerRe: bugs when type-casting a float to double Pin
cmk31-Aug-05 5:22
cmk31-Aug-05 5:22 
QuestionWhat can I do if I want the CEdit box only receive the numbers? Pin
pantao55130-Aug-05 18:02
pantao55130-Aug-05 18:02 
AnswerRe: What can I do if I want the CEdit box only receive the numbers? Pin
Barm30-Aug-05 18:14
Barm30-Aug-05 18:14 
GeneralRe: What can I do if I want the CEdit box only receive the numbers? Pin
pantao55130-Aug-05 19:36
pantao55130-Aug-05 19:36 
Questionhow to delete say some 50 bytes from the begning of the file Pin
pradish30-Aug-05 17:32
pradish30-Aug-05 17:32 
AnswerRe: how to delete say some 50 bytes from the begning of the file Pin
Christian Graus30-Aug-05 17:41
protectorChristian Graus30-Aug-05 17:41 
AnswerRe: how to delete say some 50 bytes from the begning of the file Pin
Garth J Lancaster30-Aug-05 18:36
professionalGarth J Lancaster30-Aug-05 18:36 
AnswerRe: how to delete say some 50 bytes from the begning of the file Pin
John R. Shaw30-Aug-05 21:05
John R. Shaw30-Aug-05 21:05 
Questionerror C2227 Pin
Member 216100430-Aug-05 16:59
Member 216100430-Aug-05 16:59 
AnswerRe: error C2227 Pin
Christian Graus30-Aug-05 17:10
protectorChristian Graus30-Aug-05 17:10 
GeneralRe: error C2227 Pin
Member 216100430-Aug-05 17:30
Member 216100430-Aug-05 17:30 
GeneralRe: error C2227 Pin
Christian Graus30-Aug-05 17:39
protectorChristian Graus30-Aug-05 17:39 
GeneralRe: error C2227 Pin
30-Aug-05 17:58
suss30-Aug-05 17:58 

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.