Quick actions

cmd+k|ctrl+k

Navigation

Languages

snp01

Snippet info

Language

Cpp

Visibility

public

Author

awesome2023

Created

2015-07-16T05:33:51Z

Updated

2015-07-16T05:33:51Z

#include <iostream>
 using namespace std;
 
 class Base
 {
 public:
     Base(){cout<<"Base constructor"<<endl;}
     ~Base(){cout<<"Base dectructor"<<endl;}
 };
 
 class Derived : public Base
 {
 public:
     Derived(){cout<<"Derived constructor"<<endl;}
     ~Derived(){cout<<"Derived destructor"<<endl;}
 };
 
 int main()
 {
     Base * p = new Derived();
     delete p;
     return 1;
 }
INFO