online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> class Base { public: virtual ~Base() = default; virtual void execute() const { std::cout << "Base::execute()\n"; } }; class Derived : public Base { public: virtual void execute() const override { std::cout << "Derived::execute()\n"; } }; void process(Base *b) { Base *a = new Base(*b); a->execute(); delete a; } int main() { Base b; process(&b); }

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