When you call round() with double agrument you actually call:
double round(double x);
from <cmath> not your version hence the error. If you rename your function error would be gone without cast. Yet another reason to avoid using namespace std.
1
solved C++ function returning wrong data type