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