Problem lunchbox
User annabel
Submission Time 2024-08-05 13:53:34
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:16:17: error: expected ‘)’ before ‘xx’
16 | sort(xx.begin()xx.end());
| ~ ^~
| )
lunchbox.cpp:16:25: error: no matching function for call to ‘sort(std::vector<int>::iterator)’
16 | sort(xx.begin()xx.end());
| ^
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from lunchbox.cpp:1:
/usr/include/c++/9/bits/stl_algo.h:4863:5: note: candidate: ‘template<class _RAIter> void std::sort(_RAIter, _RAIter)’
4863 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
| ^~~~
/usr/include/c++/9/bits/stl_algo.h:4863:5: note: template argument deduction/substitution failed:
lunchbox.cpp:16:25: note: candidate expects 2 arguments, 1 provided
16 | sort(xx.begin()xx.end());