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 <list> #include <iterator> using namespace std; int main() { list<int> l1{1, 2, 3, 5, 6}; list<int> l2{2, 6, 8}; auto it = l1.begin(); advance(it, 2); //works it++; //works // it+=2; //not work l2.splice(l2.begin(), l1, it); for(int a: l2) cout<<a<<" "; cout<<endl; return 0; }

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