online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <algorithm> // remove and remove_if #include <iostream> #include <vector> void Print(const std::vector<int>& vec) { for (auto val : vec) { std::cout << val << ' '; } std::cout << '\n'; } int main() { std::vector<int> v = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; Print(v); // Removes all elements with the value 5. v.erase(std::remove(v.begin(), v.end(), 5), v.end()); Print(v); // Removes all odd numbers. v.erase(std::remove_if(v.begin(), v.end(), [](int val) { return val & 1; }), v.end()); Print(v); }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue