|
-
August 4th, 2006, 03:27 AM
#1
Convert from unsigned short to double and back again
When you try to convert a number from double to unsigned short there is a possible loss of data, as this warning tell:
conversion from 'double' to 'unsigned short', possible loss of data.
But is this a danger in this case, when I first convert it from unsigned short to double?
Like this example:
Code:
unsigned short x = 10;
double y = x;
unsigned short z = y;
What I mean, is there any chance that z will hold anything else than 10 here?
Thanks!
Last edited by laitinen; August 4th, 2006 at 03:29 AM.
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
|