Problem pythonlist
User m0chib8gel
Submission Time 2025-06-18 10:27:33
Score 0
Max Time N/A
Max Memory N/A

Compile Error

pythonlist.cpp: In function ‘int main()’:
pythonlist.cpp:15:5: error: ‘X’ was not declared in this scope
15 | if (X==1) {
| ^
pythonlist.cpp:16:9: error: redeclaration of ‘int X’
16 | int X;
| ^
pythonlist.cpp:15:5: note: ‘<typeprefixerror>X’ previously declared here
15 | if (X==1) {
| ^
pythonlist.cpp:24:12: error: no matching function for call to ‘std::queue<int>::pop(int&)’
24 | q.pop(X);
| ^
In file included from /usr/include/c++/9/queue:64,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:86,
from pythonlist.cpp:1:
/usr/include/c++/9/bits/stl_queue.h:292:7: note: candidate: ‘void std::queue<_Tp, _Sequence>::pop() [with _Tp = int; _Sequence = std::deque<int, std::allocator<int> >]’
292 | pop()
| ^~~
/usr/include/c++/9/bits/stl_queue.h:292:7: note: candidate expects