Problem smurf
User Harshithdagot
Submission Time 2026-07-08 16:59:09
Score 0
Max Time N/A
Max Memory N/A

Compile Error

smurf.cpp: In function ‘int main()’:
smurf.cpp:13:8: error: ‘class std::vector<int>’ has no member named ‘push_front’
13 | arr.push_front(b)
| ^~~~~~~~~~
smurf.cpp:16:14: error: no matching function for call to ‘std::vector<int>::back(int&)’
16 | arr.back(b)
| ^
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++/9/algorithm:71,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from smurf.cpp:1:
/usr/include/c++/9/bits/stl_vector.h:1140:7: note: candidate: ‘std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::back() [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::reference = int&]’
1140 | back() _GLIBCXX_NOEXCEPT