|
-
July 1st, 2002, 01:26 PM
#1
Type conversion.
--------------------------------------------------------------------------
unsigned int x = 100;
unsigned int y = 200;
float f;
f = (float)x-(float)y; // ok result -100.000
f = (float)(x-y); // Not ok , result 4.29497e+009
--------------------------------------------------------------------------
can anybody tell me why this behaviour by compiler
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|