online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> class Foo { public: Foo(int argX) : Foo(argX, defaultYValue) {} Foo(int argX, int argY) : x(argX), y(argY) {}; public: const int x; const int y; const int defaultYValue = -1; }; int main() { Foo foo(42); std::cout << "Y value is: " << foo.y << std::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