diff --git a/Tree/BST/02 BST Insert,Inorder&Search.cpp b/Tree/BST/02 BST Insert,Inorder&Search.cpp index 81371f1..3bb4b84 100644 --- a/Tree/BST/02 BST Insert,Inorder&Search.cpp +++ b/Tree/BST/02 BST Insert,Inorder&Search.cpp @@ -24,7 +24,7 @@ void BST::Insert(int key) { Node* t = root; Node* p; - Node* r; + Node* r=t; // root is empty if (root == nullptr) {