|
-
April 16th, 1999, 07:13 AM
#1
repost: type conversion problem
Hi,
here is a repost of my message:
I have a problem with following code:
void calculateamount( long* l_amount )
{
double amount;
// amount gets calculated here
// the result is: 19.67
amount *= 100;
*l_amount = amount;
// then l_amount = 1966 and not 1967. WHY ????
// how can i prevent it?
}
I use VC6, SP2. U can find an example project on http://www.dedenet.de/d_l_test.zip
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
|