A function called round exists in cmath, causing your function to conflict with it. You don't need to call floor when rounding the number, casting to an int implicitly rounds down. Just remove the call to floor and don't include cmath.
When I try to compile with gcc it doesn't compile because round clash with the round function in math.h that unfortunately is included from the cmath header. I see no other way than to rename your round function or put it inside a namespace.