Simple C array declaration / assignment question
arrays, c, declaration, variable-assignment
Solution
you can declare static array with data to initialize from:
static int initvalues[3] = {1,2,3};
…
if(1)
memmove(values,initvalues,sizeof(values));
Problem
In higher level languages I would be able something similar to this example in C and it would be fine. However, when I compile this C example it complains bitterly. How can I assign new arrays to the array I declared? ``` int values[3]; if(1) values = {1,2,3}; printf("%i", values[0]); ``` Thanks.