|
-
October 31st, 2002, 02:28 AM
#1
conversion of values when typecasting
Hey,
Yes, I know; Don't typecast!
But I came across an example in connection with another thread, where the properties of the typecast is used. Now, I get scared when I start to use the inplicit properties of C++ to get functionality.
So can anyone tell me if there are excact convensions for converting when typecasting, or if it is platform/compiler/vendor/whatever specific?
For example if I have
float value(1.99);
int integer = (int) value;
can I then count on "integer" always becomming 1? Will the decimal always just be stripped away or will some clever rounding be attempted somehwere (when the customer is standing with all the big bosses) and suddenly integer is 2?
Cheers,
villemos
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
|