Home STD Contest Notification Clarification Problems Ranklist Status Print Sign Out

View Compilation Error

1_868_2410_193.cpp: In function 'int main()':
1_868_2410_193.cpp:23:15: error: call of overloaded 'round(float&)' is ambiguous
   t=round(a[i]);
               ^
1_868_2410_193.cpp:23:15: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:44:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:41,
                 from 1_868_2410_193.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/math.h:874:25: note: double round(double)
   extern double __cdecl round (double);
                         ^
1_868_2410_193.cpp:3:7: note: float round(float)
 float round(float a)
       ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:41:0,
                 from 1_868_2410_193.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:1614:3: note: constexpr long double std::round(long double)
   round(long double __x)
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:1610:3: note: constexpr float std::round(float)
   round(float __x)
   ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-06-26 18:38:13, Gzip enabled