In C++11, in-class member initializers are allowed, but basically act the same as initializing in a member initialization list. Therefore, the size of the array must be explicitly stated.
Stroustrup has a short explanation on his website here.
The error message means that you are providing too many items for an array of length 0, which is what int []
evaluates to in that context.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…