online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> using namespace std; class ABC; class XYZ { int data; public: void setvalue(int value) { data=value; } friend void add(ABC,XYZ); }; class ABC { int data; public: void setvalue(int value) { data=value; } friend void add(ABC,XYZ); }; //ORDER OF PARAMETER CHANGED TO MATCH WITH THE FRIEND DECLARATION void add(ABC obj1, XYZ obj2) { cout << "Sum of data values of XYZ and ABC objects using friend function = " << obj1.data + obj2.data; cout << "\n"; } int main() { XYZ X; ABC A; X.setvalue(5); A.setvalue(50); add(A,X); //ORDER OF ARGUMENTS CHANGED }

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