Possible loss of precision
March 9th, 2009
Applies to:
NA
Description:
A variable of type double is assigned to int
Cause:
Example is:
double y = 3.14;
int x;
x = y;
Applies to:
NA
Description:
A variable of type double is assigned to int
Cause:
Example is:
double y = 3.14;
int x;
x = y;
Use a type cast in assigning the variable.
Example:
double y = 3.14;
int x;
x = (int) y;