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() { Derived d; process(&d); }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text



Program is not being debugged. Click "Debug" button to start program in debug mode.