online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> class X { public: X(int i) : x(i) { std::cout << "X::X(int i) : " << x << "\n"; } private: X(const X &other) : x(other.x) { std::cout << "X::X(const X&) : " << x << "\n"; } int x; }; void f(X &x) { std::cout << "void f(X&)" << "\n"; } void f(const X &x) { std::cout << "void f(const X&)" << "\n"; } void f(X &&x) { std::cout << "void f(X&&)" << "\n"; } int main() { X A(42); const X B(42); f(A); f(B); f(X(42)); f(42); }

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