初始化vector
v = vector<int>(10,-1); //now v is a vector with size 10 and values -1 for(int i : v) cout << i << ' ';
Last updated 6 years ago
Was this helpful?