What do you want to save?
Add Code snippet
New code examples
-
C++ 2022-01-31 21:17:58
how to delete an element in vector pair in cpp
#include <iostream> #include <utility> #include <vector> using namespace std; int main() { vector< pair<int, int> > v; int N = 5; const int threshold = 2; for(int i = 0; i < N; ++i) v.push_back(m... Add solution -
C++ 2021-10-28 18:36:05
removing element from vector while iterating c++
#include <iostream> #include <vector> #include <algorithm> int main() { std::vector<int> v = { 1, 2, 3, 4, 5, 6 }; auto it = v.begin(); while (it... Add solution