Answers for "vector of cpp"

C++
1

vector of vectors c++

vector<vector<int>> matrix(x, vector<int>(y));

This creates x vectors of size y, filled with 0's.
Posted by: Guest on May-06-2021
0

cpp vector

vector<int> v1;
v1.push_back(10); // adds 10
v1.pop_back(); // removes 10
Posted by: Guest on April-16-2022

Browse Popular Code Answers by Language