Problem potatoqueue
User Lsc111
Submission Time 2023-06-03 19:40:48
Score 0
Max Time N/A
Max Memory N/A

Compile Error

potatoqueue.cpp:5:5: error: ‘int index’ redeclared as different kind of entity
5 | int index = 0;
| ^~~~~
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:2:
/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 ‘void join(int)’:
potatoqueue.cpp:20:21: error: no matching function for call to ‘std::stack<std::pair<int, int> >::push(<brace-enclosed initializer list>)’
20 | s.push({index,H});
| ^
In file included from /usr/include/c++/9/stack:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:89,
from potatoqueue.cpp:2:
/usr/include/c++/9/b