vector of fixed size c++ code example
Example 1: how to initialize vector in c++ with all elements 0
vector<int> arr(10,0);
Example 2: create vector with fixed size c++
std::vector<int> v(10);
v.size(); //returns 10
vector<int> arr(10,0);
std::vector<int> v(10);
v.size(); //returns 10