Problem pythonlist
User Pradhyun
Submission Time 2025-06-18 09:26:10
Score 0
Max Time N/A
Max Memory N/A

Compile Error

pythonlist.cpp: In function ‘int main()’:
pythonlist.cpp:9:19: error: ‘X’ was not declared in this scope
9 | vec.push_back(X);
| ^
pythonlist.cpp:10:13: error: ‘class std::vector<int>’ has no member named ‘bac’; did you mean ‘back’?
10 | cout << vec.bac();
| ^~~
| back
pythonlist.cpp:11:13: error: expected ‘;’ before ‘}’ token
11 | vec.pop_back
| ^
| ;
12 | }
| ~
pythonlist.cpp:11:5: error: invalid use of non-static member function ‘void std::vector<_Tp, _Alloc>::pop_back() [with _Tp = int; _Alloc = std::allocator<int>]’
11 | vec.pop_back
| ~~~~^~~~~~~~
In file included from /usr/include/c++/9/vector:67,
from /usr/include/c++/9/functional:62,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c