sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:25:32: error: overloaded function with no contextual type information
25 | next = j;
| ^
sorting.cpp:30:16: error: cannot resolve overloaded function 'next' based on conversion to type 'int'
30 | Q[i] = next;
| ^~~~
sorting.cpp:31:23: error: no match for 'operator[]' (operand types are 'std::vector<int>' and '<unresolved overloaded function type>')
31 | swap(ns[i], ns[next]);
| ^
In file included from /usr/include/c++/11/vector:67,
from sorting.cpp:2:
/usr/include/c++/11/bits/stl_vector.h:1043:7: note: candidate: 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::reference = int&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]'
1043 | operator[](size_type __n) _GLIBCXX_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/11/bits/stl_vector.h:1043:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::vector<int>::size_type' {aka 'long unsigned int'}
1043 | operator[](size_type __n) _GLIBCXX_NOEXCEPT
| ~~~~~~~~~~^~~
/usr/include/c++/11/bits/stl_vector.h:1061:7: note: candidate: 'std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) const [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::const_reference = const int&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]'
1061 | operator[](size_type __n) const _GLIBCXX_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/11/bits/stl_vector.h:1061:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::vector<int>::size_type' {aka 'long unsigned int'}
1061 | operator[](size_type __n) const _GLIBCXX_NOEXCEPT
| ~~~~~~~~~~^~~