online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> using namespace std; int maxVal(int lhs, int rhs) { if (lhs > rhs) { return lhs; } else { return rhs; } } int main() { int x = 41; int y = 7; int z = maxVal(x,y); ++z; // ++maxVal(x,y); // LATER, uncomment this line to see what happens. cout << "main's x is at address " << &x << ", and holds " << x << endl; cout << "main's y is at address " << &y << ", and holds " << y << endl; cout << "main's z is at address " << &z << ", and holds " << z << 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