I have a program with 2 \"paired\" integer arrays newNumerator[ ], and newDenominator[ ] which both have 9 integers in them. I wrote a function that sorts them in ascending ord
You said:
I have a program with 2 "paired" integer arrays newNumerator[ ], and newDenominator[ ]
Yet your function defined as:
void sortData(int *newNumerator[], int *newDenominator[], int newSize)
I think that should be:
void sortData(int newNumerator[], int newDenominator[], int newSize)
If that is indeed the case, then the lines:
temp1 = *newNumerator[count];
*newNumerator[count] = *newNumerator[count + 1];
*newNumerator[count + 1] = temp1;
temp2 = *newDenominator[count];
*newDenominator[count] = *newDenominator[count + 1];
*newDenominator[count + 1] = temp2;
need to be:
temp1 = newNumerator[count]; // Remove the *
newNumerator[count] = newNumerator[count + 1];
newNumerator[count + 1] = temp1;
temp2 = newDenominator[count];
newDenominator[count] = newDenominator[count + 1];
newDenominator[count + 1] = temp2;