How can I assign an array from an initializer list?
You cannot assign directly to an array after its declaration. Basically your code is the same as You have to either assign the value at declaration or use a loop (or std::copy) to assign elements. Since your array seems to be a member variable, you can also initialize it in the constructor initialization list: