// FILE: SelSrtDr.cpp // DRIVER FOR FUNCTION "sel_sort" #include #define SIZE 5 #include "SelSort.cpp" // Functions Used... // SORTS AN ARRAY (ASCENDING ORDER) USING SELECTION SORT ALGORITHM // USES exchange AND find_index_of_min void sel_sort (apvector &); // INOUT: array to be sorted // driver (not included in the text) int main () { // Local Data... apvector items(SIZE); // read in the array of items to be sorted cout << endl << "Enter " << SIZE << " integers seperated by a space > " << endl; for (int i = 0; i < SIZE; i++) cin >> items[i]; // sort the items sel_sort(items); // print sorted list of items cout << "The sorted items : "; for (int i = 0; i < SIZE; i++) cout << items[i] << " "; return 0; }