Problem potatoqueue
User hwy
Submission Time 2023-06-10 21:48:32
Score 0
Max Time N/A
Max Memory N/A

Compile Error

potatoqueue.cpp:12:5: error: ‘int index’ redeclared as different kind of entity
12 | int index;
| ^~~~~
In file included from /usr/include/string.h:432,
from /usr/include/c++/9/cstring:42,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:48,
from potatoqueue.cpp:1:
/usr/include/strings.h:61:1: note: previous declaration ‘const char* index(const char*, int)’
61 | index (const char *__s, int __c) __THROW
| ^~~~~
potatoqueue.cpp: In function ‘int query(int)’:
potatoqueue.cpp:36:2: error: reference to ‘copy’ is ambiguous
36 | copy = sorted_q;
| ^~~~
In file included from /usr/include/c++/9/deque:67,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:68,
from potatoqueue.cpp:1:
/usr/include/c++/9/bits/stl_deque.h:410:5: note: candidates are: ‘template<class _Tp> std::_Deque_iterator<_Tp, _Tp&, _Tp*> std