online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <stdio.h> class Base { public: virtual ~Base() { printf("~Base\r\n"); } void operator delete(void *m) { printf("delete Base\r\n"); } }; class Derived : public Base { public: Derived() { x = 1; } ~Derived() { printf("~Derived\r\n"); } void operator delete(void *m) { printf("delete Derived\r\n"); } int x; }; int main() { Derived *derived = new Derived(); printf("1) delete derived (%i)\r\n", ((Derived*)derived)->x); delete derived; printf("2) delete derived (%i)\r\n", ((Derived*)derived)->x); delete derived; 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