Borderou de evaluare (job #2168648)
Utilizator | Data | 14 martie 2018 11:50:59 | |
---|---|---|---|
Problema | Divizor si multiplu | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘int div(int, int)’:
user.cpp:7:22: error: ambiguating new declaration of ‘int div(int, int)’
int div (int a, int b)
^
In file included from /usr/include/c++/5/cstdlib:72:0,
from /usr/include/c++/5/ext/string_conversions.h:41,
from /usr/include/c++/5/bits/basic_string.h:5249,
from /usr/include/c++/5/string:52,
from /usr/include/c++/5/bits/locale_classes.h:40,
from /usr/include/c++/5/bits/ios_base.h:41,
from /usr/include/c++/5/ios:42,
from /usr/include/c++/5/istream:38,
from /usr/include/c++/5/fstream:38,
from user.cpp:1:
/usr/include/stdlib.h:788:14: note: old declaration ‘div_t div(int, int)’
extern div_t div (int __numer, int __denom)
^
user.cpp: In function ‘int main()’:
user.cpp:30:65: error: no match for ‘operator==’ (operand types are ‘div_t’ and ‘int’)
if (d%x == 0 && (p/d)%x == 0 && div(d, p/d) == x)
^
In file included from /usr/include/c++/5/iosfwd:40:0,
from /usr/include/c++/5/ios:38,
from /usr/include/c++/5/istream:38,
from /usr/include/c++/5/fstream:38,
from user.cpp:1:
/usr/include/c++/5/bits/postypes.h:216:5: note: candidate: template<class _StateT> bool std::operator==(const std::fpos<_StateT>&, const std::fpos<_StateT>&)
operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
^
/usr/include/c++/5/bits/postypes.h:216:5: note: template argument deduction/substitution failed:
user.cpp:30:68: note: ‘div_t’ is not derived from ‘const std::fpos<_StateT>’
if (d%x == 0 && (p/d)%x == 0 && div(d, p/d) == x)
^
In file included from /usr/include/c++/5/bits/stl_algobase.h:64:0,
from /usr/include/c++/5/bits/char_traits.h:39,
from /usr/include/c++/5/ios:40,
from /usr/include/c++/5/istream:38,
from /usr/include/c++/5/fstream:38,
from user.cpp:1:
/usr/include/c++/5/bits/stl_pair.h:214:5: note: candidate: template<class _T1, class _T2> constexpr bool std::operator==(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
^
/usr/include/c++/5/bits/stl_pair.h:214:5: note: template argument deduction/substitution failed:
user.cpp:30:68: note: ‘div_t’ is not derived from ‘const std::pair<_T1, _T2>’
if (d%x == 0 && (p/d)%x == 0 && div(d, p/d) == x)
^
In file included from /usr/include/c++/5/bits/stl_algobase.h:67:0,
from /usr/include/c++/5/bits/char_traits.h:39,
from /usr/include/c++/5/ios:40,
from /usr/include/c++/5/istream:38,
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !