u01: Add messages to destructor

This commit is contained in:
Simon Bruder 2023-04-21 22:46:37 +02:00
parent 48cfafc9a3
commit 51a326b66c

View file

@ -3,9 +3,11 @@
#include "node.h"
node::~node() {
std::cout << "enter ~node() of \"" << get_name() << "\"" << std::endl;
for (node *child : children) {
delete child;
}
std::cout << "leave ~node() of \"" << get_name() << "\"" << std::endl;
}
std::string node::get_name() const { return name; }