struct A{
int V[100];
};
void f(A a)
{
a.V[0]=30;
}
int main()
{
A a;
a.V[0]=10;
f(a);
cout<<a.V[0];
}
I expected 30 as output, instead I obtain 10. I knew that, also if the parameters are passed by value, arrays (also if members of class/struct) are passed by reference. It seems instead, when members, they are passed by copy. Is true?