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
The main error you have is that you are giving wrong values to static_cast<>. Later you use them correctly by dereferencing, but in the cast you are missing that.
What you need is:
double percentageLeft = 100.0 * static_cast((*newNumerator)[count]) / *newDenominator[count];
double percentageRight = 100.0 * static_cast((*newNumerator)[count + 1]) / *newDenominator[count + 1];
Added parentheses to make it explicitly clear what the dereferencing is.
Also if you are not changing the actual array pointers, but only the contents of the arrays, you can remove the dereferencing hassle altogether. If you define the function as
void sortData(int newNumerator[], int newDenominator[], int newSize)
you can just use the normal indexing without dereferencing every time you use it.