Guest_imported
New member
- Jan 1, 1970
- 0
I need to cast a double into a int type, lets say by rounding the double into an int:
double dblnum;
int intnum;
intnum = round(dblnum) ???????
Something like this? How can I do it please?
for example if dblnum = 1.6 then intnum = 2, if dblnum = 2.3 then intnum = 2 and so on... this should be easy right?
Tk you
double dblnum;
int intnum;
intnum = round(dblnum) ???????
Something like this? How can I do it please?
for example if dblnum = 1.6 then intnum = 2, if dblnum = 2.3 then intnum = 2 and so on... this should be easy right?
Tk you