#include #include #include "classes.hpp" using std::cout; using std::endl; int main(int argc, char** argv) { A* a1 = new A(); B* b1 = new B(a1, "b1"); B* b2 = new B(a1, "b2"); cout << "calling a1->emit()" << endl; a1->emit(); delete b1; cout << "calling a1->emit()" << endl; a1->emit(); cout << "deleting a1" << endl; delete a1; return 0; }