u01: Null pointers in main after delete

This commit is contained in:
Simon Bruder 2023-04-22 11:43:04 +02:00
parent 6a7c1c4546
commit 65f13d8780

View file

@ -3,8 +3,10 @@
int main(int argc, char **argv) {
node *t = create_complete_tree(2, 4);
delete t;
t = nullptr;
node *root = new node("root");
root->add_child(new node("left child"));
root->add_child(new node("right child"));
delete root;
root = nullptr;
}