0
Sort an array in c++.
Sort any array using fuction or loop
3 Respuestas
+ 1
Use qsort() function
syntax:
qsort(arrayname,sizeof(array),sizeof(arraytype),comparing_function)
https://www.geeksforgeeks.org/sort-c-stl/amp/
https://code.sololearn.com/ce2wAshGPaxw/?ref=app
+ 1
You can include algorithm header and use it sort function to sort any container which implemented random access iterator. you can also set execute policy which help container sorted faster in multithreaded form. but for sorting ANY array , you must implement a comparator routine(function).
0
sort(arr, arr + (int)arr.size());