online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
/****************************************************************************** Online C++ Compiler. Code, Compile, Run and Debug C++ program online. Write your code in this editor and press "Run" button to compile and execute it. *******************************************************************************/ #include <iostream> #include <vector> class A{ public: int value; A(){ static int next_value = 0; value = next_value++; } ~A(){ std::cout << "DELETED:" << value << std::endl; } operator int(){return value;} }; int main() { std::vector<A> v(5); for(int i : v) std::cout<< i; //01234 std::cout<< std::endl; v.erase(v.begin()+2); //DELETE:4 for(int i : v) std::cout<< i; //0134 std::cout<< std::endl; }

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