foo.cc: In function 'void selectSort()':
foo.cc:21:25: error: 'swap' was not declared in this scope
   21 |                         swap(a[i],a[minIndex]);
      |                         ^~~~
foo.cc:21:25: note: suggested alternatives:
In file included from /nix/store/lwv26rw55rr8k8dc9217ifp5sb0fr9k4-gcc/include/c++/11.3.0/utility:70,
                 from /nix/store/lwv26rw55rr8k8dc9217ifp5sb0fr9k4-gcc/include/c++/11.3.0/algorithm:60,
                 from foo.cc:1:
/nix/store/lwv26rw55rr8k8dc9217ifp5sb0fr9k4-gcc/include/c++/11.3.0/bits/stl_pair.h:533:5: note:   'std::swap'
  533 |     swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)
      |     ^~~~
In file included from /nix/store/lwv26rw55rr8k8dc9217ifp5sb0fr9k4-gcc/include/c++/11.3.0/bits/stl_pair.h:59,
                 from /nix/store/lwv26rw55rr8k8dc9217ifp5sb0fr9k4-gcc/include/c++/11.3.0/utility:70,
                 from /nix/store/lwv26rw55rr8k8dc9217ifp5sb0fr9k4-gcc/include/c++/11.3.0/algorithm:60,
                 from foo.cc:1:
/nix/store/lwv26rw55rr8k8dc9217ifp5sb0fr9k4-gcc/include/c++/11.3.0/bits/move.h:196:5: note:   'std::swap'
  196 |     swap(_Tp& __a, _Tp& __b)
      |     ^~~~
   
  
    [Hydro](https://hydro.ac)提供评测服务