initialize a vector with an array code example Example: how to initialize a vector in c++ std::vector<type> name;