#include #include #include #include void quickSort (apvector &list, int first, int last); swap(apvector &list[int g],apvector & list[int h]); struct info { apstring firstname; apstring lastname; apstring email; apstring areacode; apstring phone; }; void main() { apstring path; cout<<"what is the path name in which the file is stored..?"<>path; const char *cstring; cstring = path.c_str(); apstring helo; int counter; int length; ifstream infile; infile.open (cstring,ios::in); if (infile.fail()) cerr<<"did not open corectly"<>length; apvector friends(length); for(int j=0;j>friends[j]; for(int loop=0; loop>friends[i]; } void quickSort (apvector &list, int first, int last) { int g = first, h = last; int midIndex, dividingValue, temp; midIndex = (first + last) / 2; dividingValue = list[midIndex]; do { while (list[g] < dividingValue) g++; while (list[h] > dividingValue) h--; if (g <= h) { swap(list[g], list[h]); g++; h--; } } while (g < h); if (h > first) quickSort (list,first,h); if (g < last) quickSort (list,g,last); } swap(apvector &list[int g],apvector & list[int h]) { apvector temp(1); temp[1]=list[g]; list[g]=list[h]; list[h]=temp[1]; }