online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> using namespace std; class Demo { private: int x; int y; public: Demo() { x = 0; y = 0; } Demo(int x1, int y1) { x = x1; y = y1; } friend ostream &operator<<( ostream &output, const Demo &S ) { output << "x1 : " << S.x << " y1 : " << S.y; return output; } }; int main() { Demo S1(6, 2), S2(3, 19); cout << "1st Value : " << S1 << endl; cout << "2nd Value :" << S2 << 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