The prototype function of ceil is:
double ceil(double)
I assume that the type of the variable count not of type double. To use ceil in C, you must write:
#include <math.h> // ... double count = 3.0; double result = ceil(count/2.0);
In C ++ you can use std::ceil from <cmath> ;; std :: ceil is overloaded to support several types:
#include <cmath> // ... double count = 3.0; double result = std::ceil(count/2.0);
source share