Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
remove_30-Seconds-of-C++
#include <iostream> #include <vector> #include <algorithm> int main() { std::vector<int> v {3, 5, 3, 1, 2, 3}; // Will copy from origin [begin, end), to destination auto newEndIt = std::remove(v.begin(), v.end(), 3); // Erase elements from [newEndIt, v.end()] v.erase(newEndIt, v.end()); // v is now {5, 1, 2} for (auto value : v) { std::cout << value << " "; } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
ConvHull
11
Ploshtina na krug
sin_approximation
cppPyPoly2
a
1
pointconcat
project euler problem - 3
TwoANOVA
Please log in to post a comment.