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