std::vector has a constructor declared as:
vector(size_type N, const T& x = T());
You can use it to build std::vectorcontaining Ncopies x. The default value for xis the value initialized T(if it Tis a class type with a standard constructor, then the initialization of the value is the default).
Simple to initialize a data element std::vectorusing this constructor:
struct S {
std::vector<int> x;
S() : x(15) { }
}