posted 7 years ago
I am trying to implement a Delete function in Binary Search Tree. The Delete function works fine when node to be deleted is not root node and has no or one child node. When node to be deleted is not root node and has two child nodes, the program stops working and a window pops up saying "main.exe" file has stopped working" ("main" is the name of the cpp file). If the node to be deleted is root node, the Delete function only works when the root node has no child nodes. When the root node has at-least one child node, the program stops working and a window pops up saying "main.exe" file has stopped working" ("main" is the name of the cpp file) and i can't seem to figure out the problem. Code is given below. I am using code blocks , windows 8.1.