I am getting the following errors.
../MergeSort.c:32: error: expected expression before ‘]’ token
../MergeSort.c:33: error: expected expression before ‘]’ token
void mergesortinplace (int start, int length, int array[]){
if (length >= 2){
mergesortinplace(0, (length/2), array[]); /*GETTING ERROR HERE*/
mergesortinplace((length - (length/2)), length, array[]); /*AND HERE*/
}
if (length >= 1){
if (array[start] > array[length]){
int tmp = array[start];
array[start] = array[length];
array[length] = tmp;
}
}
}
As I am relatively new to c I still don't know what most errors are so would anyone care to explain exactly what this error means and why it is occurring here. Thanks.