I keep receiving an error saying "Expression must have a constant value the value of variable 'n1' cannot be used as a constant ". I don't know what am I use suppose to do to fix it.
void merge(DataType theArray[], int first, int mid, int last)
int i, j, k;
int n1 = mid - first + 1;
int n2 = last - mid;
int L1[n1], R1[n2]; //n1, n2 are giving me the same problem mentioned above
for (i = 0; i < n1; i++)
L1[i] = theArray[first + i];
for (j = 0; j < n2; j++)
R1[j] = theArray[mid + 1 + j];