Borderou de evaluare (job #2166819)
Utilizator | Data | 13 martie 2018 19:03:40 | |
---|---|---|---|
Problema | Deque | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:10:14: error: ‘int index’ redeclared as different kind of symbol
int n, k, x, index;
^
In file included from /usr/include/c++/5/cstring:42:0,
from /usr/include/x86_64-linux-gnu/c++/5/32/bits/stdc++.h:48,
from user.cpp:1:
/usr/include/string.h:477:1: note: previous declaration ‘const char* index(const char*, int)’
index (const char *__s, int __c) __THROW
^
user.cpp: In function ‘int main()’:
user.cpp:17:14: error: overloaded function with no contextual type information
for(index=2; index<=k; index++)
^
user.cpp:17:25: error: invalid operands of types ‘<unresolved overloaded function type>’ and ‘int’ to binary ‘operator<=’
for(index=2; index<=k; index++)
^
user.cpp:17:33: error: no post-increment operator for type
for(index=2; index<=k; index++)
^
user.cpp:22:38: error: no matching function for call to ‘make_pair(int&, <unresolved overloaded function type>)’
d.push_back(make_pair(x,index));
^
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/sstream:38,
from /usr/include/c++/5/complex:45,
from /usr/include/c++/5/ccomplex:38,
from /usr/include/x86_64-linux-gnu/c++/5/32/bits/stdc++.h:52,
from user.cpp:1:
/usr/include/c++/5/bits/stl_pair.h:276:5: note: candidate: template<class _T1, class _T2> constexpr std::pair<typename std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&)
make_pair(_T1&& __x, _T2&& __y)
^
/usr/include/c++/5/bits/stl_pair.h:276:5: note: template argument deduction/substitution failed:
user.cpp:22:38: note: couldn't deduce template parameter ‘_T2’
d.push_back(make_pair(x,index));
^
user.cpp:25:18: error: invalid operands of types ‘<unresolved overloaded function type>’ and ‘int’ to binary ‘operator<=’
for(; index<=n; index++)
^
user.cpp:25:26: error: no post-increment operator for type
for(; index<=n; index++)
^
user.cpp:30:38: error: no matching function for call to ‘make_pair(int&, <unresolved overloaded function type>)’
d.push_back(make_pair(x,index));
^
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,
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !