Suppose I have an array
int arr[] = {...}; arr = function(arr);
I have the function as
int& function(int arr[]) { //
The semantics of array passing and return can be quite confusing. Use a std::vector instead.