Borderou de evaluare (job #1796595)
Utilizator | Data | 3 noiembrie 2016 17:00:28 | |
---|---|---|---|
Problema | Cercuri4 | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:26:15: error: ‘int fmax’ redeclared as different kind of symbol
int n,f[3005],fmax,i,j;
^
In file included from /usr/include/features.h:357:0,
from /usr/include/i386-linux-gnu/c++/4.8/bits/os_defines.h:39,
from /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h:420,
from /usr/include/c++/4.8/iosfwd:38,
from /usr/include/c++/4.8/ios:38,
from /usr/include/c++/4.8/istream:38,
from /usr/include/c++/4.8/fstream:38,
from user.cpp:1:
/usr/include/i386-linux-gnu/bits/mathcalls.h:340:1: error: previous declaration of ‘double fmax(double, double)’
__MATHCALL (fmax,, (_Mdouble_ __x, _Mdouble_ __y));
^
user.cpp: In function ‘int main()’:
user.cpp:30:9: error: overloaded function with no contextual type information
fmax=0;
^
user.cpp:42:27: error: no matching function for call to ‘max(<unresolved overloaded function type>, int&)’
fmax=max(fmax,f[i]);
^
user.cpp:42:27: note: candidates are:
In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0,
from /usr/include/c++/4.8/ios:40,
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_algobase.h:216:5: note: const _Tp& std::max(const _Tp&, const _Tp&) [with _Tp = int]
max(const _Tp& __a, const _Tp& __b)
^
/usr/include/c++/4.8/bits/stl_algobase.h:216:5: note: no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘const int&’
/usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
/usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: template argument deduction/substitution failed:
user.cpp:42:27: note: candidate expects 3 arguments, 2 provided
fmax=max(fmax,f[i]);
^
In file included from /usr/include/c++/4.8/algorithm:62:0,
from user.cpp:2:
/usr/include/c++/4.8/bits/stl_algo.h:4254:5: note: template<class _Tp> _Tp std::max(std::initializer_list<_Tp>)
max(initializer_list<_Tp> __l)
^
/usr/include/c++/4.8/bits/stl_algo.h:4254:5: note: template argument deduction/substitution failed:
user.cpp:42:27: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘float (*)(float, float)’
fmax=max(fmax,f[i]);
^
user.cpp:42:27: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘long double (*)(long double, long double)’
user.cpp:42:27: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘double (*)(double, double)throw ()’
user.cpp:42:27: note: candidate expects 1 argument, 2 provided
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !