Problem sorting2
User bribritt
Submission Time 2025-12-10 22:17:49
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sorting2.cpp: In function ‘void sort_questions(int, int, int*)’:
sorting2.cpp:8:4: error: ‘swap’ was not declared in this scope
8 | swap(A[0],A[1]);
| ^~~~
sorting2.cpp:8:4: note: suggested alternatives:
In file included from /usr/include/c++/9/vector:68,
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 sorting2.cpp:1:
/usr/include/c++/9/bits/stl_bvector.h:134:3: note: ‘std::swap’
134 | swap(bool& __x, _Bit_reference __y) noexcept
| ^~~~
In file included from /usr/include/c++/9/bits/stl_pair.h:59,
from /usr/include/c++/9/utility:70,
from /usr/include/c++/9/algorithm:60,
from sorting2.cpp:1:
/usr/include/c++/9/bits/move.h:182:5: note: ‘std::swap’
182 | swap(_Tp& __a, _Tp& __b)
| ^