casting double to integer in mikroc

Status
Not open for further replies.

channa123#

Newbie level 1
Joined
Sep 9, 2014
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
5
I used below code to cast double to integer.But it give me an error as invalid expression in mikroc pro
intpart is a double variable

Code:
int int_prt = (int)floor(intpart);
 
Last edited by a moderator:

have you included
Code:
#include <math.h>

also check the MickroC documentation that it supports floor()
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…