online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
using namespace std; #include<iostream> class A { public: A() { std::cout << "A\n"; } }; class B: public A { public: B() { std::cout << "B is derived class\n"; } }; int main() { A * a=new A(); //valid B * b=new B(); //valid A * aa=new B(); //valid B * bb=new A(); //invalid 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