online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> class Demo { private: int e_demo {}; public: Demo(int demo) : e_demo{ demo } { } friend Demo operator+(const Demo& x1, const Demo& x2); int getDemo() const { return e_demo; } }; Demo operator+(const Demo& x1, const Demo& x2) { return Demo{x1.e_demo + x2.e_demo}; } int main() { Demo demo1{ 5 }; Demo demo2{ 5 }; Demo demoSum{ demo1 + demo2 }; std::cout << " Total Count is " << demoSum.getDemo(); 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