In C++ you can certainly pass an array directly by reference:
#include <iostream>
using namespace std;
void foo(int (&a)[10])
{
for (int i = 0; i < sizeof a / sizeof *a; ++i)
{
cout << a[i] << '\n';
}
}
int main()
{
int x[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
foo(x);
}
However, that's not suitable as a solution because this is clearly not a real array we're talking about (unless you depend on a compiler extension) since its size depends on runtime information. Arrays in C++ must have a compile time constant size. Also, when passing an array by reference, the argument size must match the parameter size. An array of size 11 is incompatible with an array of size 10, for example.
Remi, post your code so that we can see what you're talking about. It's possible you're using C instead of C++, or relying on a compiler extension, both of which change the best solution for your problem.