Before I tried assigning each array to {}; , but Visual Studio told me that 10 is out of range '0' to '9', and that the writable size is '40 bytes', but '44' might be written
its easier to say
int foo[] {1,2,3,4,5,6,7,8,9,10}; //foo auto sizes to fit, but it is still constant sized. I don't think you need the = sign here, I forget.
int foo[10]{}; //all zeros. no need for = for sure
as noted your bug is not having a type on it.
const size = 10;
int foo[size] = {1,2,3,4,5,6,7,8,9,10}; //ok, initialize
foo[size] = {1,2,3,4,5,6,7,8,9,10}; //error, 10 is too big, on top of other woes.
* If the m_* in the body of a class constructor are local automatic variables and the statements are supposed to be variable declarations, then yes, these declarations lack type.
* If the m_* are member variables of class Unique, then the statements are malformed assignments.
1 2 3 4 5 6
int array[SIZE];
array[SIZE] = 42; // assignment. Out of range error, the last element is array[SIZE-1]
array[SIZE] = {42, 7}; // two errors. Out of range and
// left side is one int
// right side is array of int