Question: I've gotten yet another compiler error. Do I need another print function? The error is the same as last time (Id returned 1 exit status).
I've gotten yet another compiler error. Do I need another print function? The error is the same as last time (Id returned 1 exit status). The only thing that's different is I fleshed out the select_sort function
#include
if (Cindex < size) { if (array[Lindex] > array[Cindex]) { Lindex = Cindex; } return find_min_index(array, Lindex, Cindex++, size); } return Lindex; } void select_sort(int array[], int s, int index = 0) { //where the sorting actually goes //look up how to do selection sort recrusively //try doing it normally then converting it if(index == s) return; int Lindex = find_min_index(array, s, index); if(Lindex != index) swap(array[Lindex], array[index]); select_sort(array, index++, s); }
I'd also appreciate it if I was explained to me how to avoid these kinds of errors as I seem to be running into them more often. Please and thank you
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
