Borderou de evaluare (job #2477893)
Utilizator | Data | 21 octombrie 2019 11:49:00 | |
---|---|---|---|
Problema | Combinari | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:70:48: error: too few arguments to function 'bool cmp(std::pair<float, float>, std::pair<float, float>)'
sort(points.begin() + 1, points.end(), cmp());
^
main.cpp:28:6: note: declared here
bool cmp(pair<float, float> p1, pair<float, float> p2) {
^~~
main.cpp:78:43: error: no match for 'operator[]' (operand types are 'std::stack<std::pair<float, float> >' and 'std::stack<std::pair<float, float> >::size_type {aka long unsigned int}')
while (st.size() >= 2 && orient(st[st.size() - 2], st[st.size() - 1], points[i])) {
^
main.cpp:78:62: error: no match for 'operator[]' (operand types are 'std::stack<std::pair<float, float> >' and 'std::stack<std::pair<float, float> >::size_type {aka long unsigned int}')
while (st.size() >= 2 && orient(st[st.size() - 2], st[st.size() - 1], points[i])) {
^
main.cpp:83:5: error: expected ';' before '}' token
}
^
main.cpp:88:39: error: no matching function for call to 'begin(std::stack<std::pair<float, float> >&)'
for (pair<float, float> it1 : st) {
^~
In file included from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:95:0,
from main.cpp:1:
/usr/include/c++/6/valarray:1206:5: note: candidate: template<class _Tp> const _Tp* std::begin(const std::valarray<_Tp>&)
begin(const valarray<_Tp>& __va)
^~~~~
/usr/include/c++/6/valarray:1206:5: note: template argument deduction/substitution failed:
main.cpp:88:39: note: 'std::stack<std::pair<float, float> >' is not derived from 'const std::valarray<_Tp>'
for (pair<float, float> it1 : st) {
^~
In file included from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:95:0,
from main.cpp:1:
/usr/include/c++/6/valarray:1196:5: note: candidate: template<class _Tp> _Tp* std::begin(std::valarray<_Tp>&)
begin(valarray<_Tp>& __va)
^~~~~
/usr/include/c++/6/valarray:1196:5: note: template argument deduction/substitution failed:
main.cpp:88:39: note: 'std::stack<std::pair<float, float> >' is not derived from 'std::valarray<_Tp>'
for (pair<float, float> it1 : st) {
^~
In file included from /usr/include/c++/6/string:51:0,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/sstream:38,
from /usr/include/c++/6/complex:45,
from /usr/include/c++/6/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
from main.cpp:1:
/usr/include/c++/6/bits/range_access.h:87:5: note: candidate: template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::begin(_Tp (&)[_Nm])
begin(_Tp (&__arr)[_Nm])
^~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !