online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include <memory> class ParentClass { public: void Print() {std::cout << "Printing from Parent Class.\n"; }; }; class ChildClass : public ParentClass{ public: void Print() {std::cout << "Printing from Child Class.\n"; }; }; void PrintFromParentAndChildClasses(ParentClass* ParentPointer) { std::cout << "Printing from instances of parent and child classes.\n"; ParentPointer->Print(); ChildClass* ChildPointer = (ChildClass*)ParentPointer; ChildPointer->Print(); }; int main() { std::shared_ptr<ParentClass> ParentPointer = std::make_shared<ChildClass>(); PrintFromParentAndChildClasses(ParentPointer.get()); 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