In C++ pre-11 you'll need to cast the first argument to a floating point type in order to tell the compiler which overload to use (there are no overloads taking int as the first argument before C++11). Or in this case you could just replace 10 with 10.0 since it's a constant.
In C++11 your code should work as fine.