Is it possible to pass a single array element by reference (so that the argument passed in is modified)? For example, say this is a main part:
int ar[5] = {1,2,3,4,5};
test(&ar[2]);
And now this is the function definition:
void test(int &p)
{
p = p + 10;
return;
}
The above code results in a compilation error.