online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> class Base { public: void printNumber(int n = 42) { this->printNumberImpl(n); } protected: virtual void printNumberImpl(int n) { std::cout << "Base::printNumberImpl(int): " << n << '\n'; } }; class Derived : public Base { protected: virtual void printNumberImpl(int n) { std::cout << "Derived::printNumberImpl(int): " << n << '\n'; } }; int main() { Base *b = new Derived; b->printNumber(); delete 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