I have read other similar posts but I just don\'t understand what I\'ve done wrong. I think my declaration of the vectors is correct. I even tried to declare without size bu
Initializations with (...) in the class body is not allowed. Use {..} or = .... Unfortunately since the respective constructor is explicit and vector has an initializer list constructor, you need a functional cast to call the wanted constructor
vector name = decltype(name)(5);
vector val = decltype(val)(5,0);
As an alternative you can use constructor initializer lists
Attribute():name(5), val(5, 0) {}