Run Code
|
API
|
Code Wall
|
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
Set Insert Operation
test
Teatime Snack
Ptrtest
Proga1
std::erf versus erf_impl (Abramowitz & Stegun)
homework
CodeForces Div 3 - D
D.E.Shaw Binary Search Question
Splitwise Problem - 1