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 <functional> struct Point { int x, y; Point() {} Point(const int& x, const int& y) {} }; Point operator+(const Point& p1, const Point& p2) { return {p1.x+p2.x, p1.y+p2.y}; } Point p1, p2; std::function<const Point&()> fn = []{ return p1; }; int main() { Point p3 = fn() + p2; 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