Example

void function(int length, int array[5]
){
for(int i=0; i<length; i++){
cout << array[i];
}
}

Solution
Do not declare the magnitude of single dimensional arrays in function definitions.

void function(int length, int array[]){
for(int i=0; i<length; i++){
cout << array[i];
}
}