I think that is because in newer versions of C++
, sqrt
is overloaded (argument can be double
, float
or long double
) and you pass in an int. Just cast the argument to double
to make it clear:
int finalBit = sqrt( (double) (sieve.size()) ) + 1;