create a vector with fixed size initialized to a given value c++ code example Example: create vector with fixed size c++ std::vector<int> v(10); v.size(); //returns 10