[c++] Passing an array by reference