foo.cc: In function 'int main()':
foo.cc:7:18: error: no matching function for call to 'round(float&, int)'
int ss=round(s,1);
^
In file included from /usr/include/features.h:424:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/c++config.h:533,
from /usr/include/c++/7/cassert:43,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:33,
from foo.cc:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:298:1: note: candidate: double round(double)
__MATHCALLX (round,, (_Mdouble_ __x), (__const__));
^
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:298:1: note: candidate expects 1 argument, 2 provided
In file included from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:41:0,
from foo.cc:1:
/usr/include/c++/7/cmath:1771:3: note: candidate: constexpr float std::round(float)
round(float __x)
^~~~~
/usr/include/c++/7/cmath:1771:3: note: candidate expects 1 argument, 2 provided
/usr/include/c++/7/cmath:1775:3: note: candidate: constexpr long double std::round(long double)
round(long double __x)
^~~~~
/usr/include/c++/7/cmath:1775:3: note: candidate expects 1 argument, 2 provided
/usr/include/c++/7/cmath:1783:5: note: candidate: template<class _Tp> constexpr typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type std::round(_Tp)
round(_Tp __x)
^~~~~
/usr/include/c++/7/cmath:1783:5: note: template argument deduction/substitution failed:
foo.cc:7:18: note: candidate expects 1 argument, 2 provided
int ss=round(s,1);
^