Link to home
Start Free TrialLog in
Avatar of iphone
iphone

asked on

Data Conversion Warning

Hi, There data conversion warning from double to int when compile, is there anyway to solve this?

double a = 100.30;
int i = (int)a;

this is the syntax.
Avatar of jkr
jkr
Flag of Germany image

Just ignore the warning if all you want is to convert a double to an integer or use

double a = 100.30;
int i = retinterpret_cast<int>(a);

ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial