Borderou de evaluare (job #1139879)
Utilizator | Data | 11 martie 2014 16:15:44 | |
---|---|---|---|
Problema | Energii | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:4:7: error: reference to ‘max’ is ambiguous
int x[max], y[max];
^
user.cpp:3:11: note: candidates are: const int max
const int max = 10004;
^
In file included from /usr/local/include/c++/4.8.0/bits/char_traits.h:39:0,
from /usr/local/include/c++/4.8.0/ios:40,
from /usr/local/include/c++/4.8.0/istream:38,
from /usr/local/include/c++/4.8.0/fstream:38,
from user.cpp:1:
/usr/local/include/c++/4.8.0/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/local/include/c++/4.8.0/bits/stl_algobase.h:216:5: note: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
max(const _Tp& __a, const _Tp& __b)
^
user.cpp:4:15: error: reference to ‘max’ is ambiguous
int x[max], y[max];
^
user.cpp:3:11: note: candidates are: const int max
const int max = 10004;
^
In file included from /usr/local/include/c++/4.8.0/bits/char_traits.h:39:0,
from /usr/local/include/c++/4.8.0/ios:40,
from /usr/local/include/c++/4.8.0/istream:38,
from /usr/local/include/c++/4.8.0/fstream:38,
from user.cpp:1:
/usr/local/include/c++/4.8.0/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/local/include/c++/4.8.0/bits/stl_algobase.h:216:5: note: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
max(const _Tp& __a, const _Tp& __b)
^
user.cpp: In function ‘int main()’:
user.cpp:13:8: error: ‘x’ was not declared in this scope
g >> x[i];
^
user.cpp:14:8: error: ‘y’ was not declared in this scope
g >> y[i];
^
user.cpp:27:9: error: ‘x’ was not declared in this scope
if (x[i] < x[j])
^
user.cpp:30:11: error: ‘y’ was not declared in this scope
swap(y[i], y[j]);
^
user.cpp:34:10: error: ‘x’ was not declared in this scope
sumX = x[0];
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !