DevCPP assignment question
Im having problems with compiler warnings. This is what i came up with to fix it.
Code:
double d_x, d_y;
int i_z, i_a;
d_x = d_y * (double) i_z;
i_a = (int) d_x;
Now this is fine ('cuase it works), but i wish i could use this next method and not get any warnings. Any ideas?
Code:
double d_x;
int i_z, i_a;
i_z = i_a * d_x;
Oh the compiler warning is "assignment to int from double". :) Thanks.
Re: DevCPP assignment question
Code:
double d_x;
int i_z, i_a;
i_z = int(i_a * d_x);
Typecast it ;)