// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
#include <iostream>

using namespace std;

class P
{
    public:
        virtual ~P() = 0;
};

class C : public P
{
    public:
        ~C();
};

P::~P()
{
    cout << "P dead" << endl;
}

C::~C()
{
    cout << "C dead" << endl;
}

int main()
{
    P *o = new C();
    delete o;
    return 0;
}
