Hi,
when I need to pass an array to a function, it seems all the following declarations of the function will work
void f(int arr[])
void f(int arr[4]) // is this one correct?
for this:
int a[]={1,2,3,4};
f(a);
But when I assign an array to another array, it fails
int a[]={1,2,3,4};
int b[4] = a; // error: array must be initialized with a brace-enclosed initializer
So why an array passed as an argument of a function is okay, but used on the rhs of simple assignment is wrong?
Thanks!