#include <iostream>
using namespace std;
class A {
public:
A () {}
~A() { cout << "~A";}
};
class B : public A {
public:
B () {}
~B () { cout << "~B"; }
};
int main () {
A *b = new B ();
delete b;
return 0;
}
Login in to like
Login in to comment