Why we can initialize array with
int a[]={1,2,3};
but we can't assign data to existing array
a = {2,3,4};
?
Is it possible to make a function that takes const array as a parameter, and call it to assign variable in one line?
pseudocode:
int a[] = {1,2,3};
myfunc(a, (int){2,3,4});
void myfunc(int &array1, const int array2)
{
copy(array2,array1);
}