Borderou de evaluare (job #1858270)

Utilizator contnouAndrei Pavel contnou Data 27 ianuarie 2017 11:52:31
Problema Doi Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘int main()’: user.cpp:44:8: error: reference to ‘modulus’ is ambiguous if (modulus(hp - n) < modulus(hpdiv2 - n)) { ^ user.cpp:25:11: note: candidates are: long long int modulus(long long int) long long modulus(long long a) { ^ In file included from /usr/include/c++/4.8/string:48:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from user.cpp:1: /usr/include/c++/4.8/bits/stl_function.h:176:12: note: template<class _Tp> struct std::modulus struct modulus : public binary_function<_Tp, _Tp, _Tp> ^ user.cpp:44:26: error: reference to ‘modulus’ is ambiguous if (modulus(hp - n) < modulus(hpdiv2 - n)) { ^ user.cpp:25:11: note: candidates are: long long int modulus(long long int) long long modulus(long long a) { ^ In file included from /usr/include/c++/4.8/string:48:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from user.cpp:1: /usr/include/c++/4.8/bits/stl_function.h:176:12: note: template<class _Tp> struct std::modulus struct modulus : public binary_function<_Tp, _Tp, _Tp> ^ user.cpp:45:19: error: reference to ‘modulus’ is ambiguous operations += modulus(hp - n) + 1; ^ user.cpp:25:11: note: candidates are: long long int modulus(long long int) long long modulus(long long a) { ^ In file included from /usr/include/c++/4.8/string:48:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from user.cpp:1: /usr/include/c++/4.8/bits/stl_function.h:176:12: note: template<class _Tp> struct std::modulus struct modulus : public binary_function<_Tp, _Tp, _Tp> ^ user.cpp:48:19: error: reference to ‘modulus’ is ambiguous

Ceva nu functioneaza?