online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include "ComputeInt.h" #include<iostream> int main() { ComputeInt computation; computation.real = 5; ComputeInt computation2; computation2.real = 10; computation.operator=(Factorial(computation2)); std::cout<<computation.real;//this prints 11 }
#include "ComputeInt.h" ComputeInt Factorial(const ComputeInt& computation) { ComputeInt result ; //create object of type ComputeInt result.real= computation.real +1; //note result.real at the left hand side return result; }
#ifndef ComputeInt_H #define ComputeInt_H class ComputeInt { public: int real;//removed () here. This means real is a data member now }; ComputeInt Factorial(const ComputeInt& computation); #endif

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