assigment was to read a file of ints and sort it thats no problem. Extra credit is to read in names from a file and sort them.. Having problems making this sort strings instead of ints.. when i used strcpy and strcmp i could not get it to work.
void bubbleSort1(int x[], int n) {
for (int pass=1; pass < n; pass++) {
for (int i=0; i < n-pass; i++) {
if (x[i] > x[i+1]) {
// exchange elements
int temp = x[i]; x[i] = x[i+1]; x[i+1] = temp;
}
}
}
}
