[ad_1]
You do not set a value to BST::root after creating obj_bst. Thus obj_bst.getBSTRoot() returns an invalid pointer on which you call setVal which causes a crash.
[ad_2]
solved Don’t understand the output of the given code [closed]
[ad_1]
You do not set a value to BST::root after creating obj_bst. Thus obj_bst.getBSTRoot() returns an invalid pointer on which you call setVal which causes a crash.
[ad_2]
solved Don’t understand the output of the given code [closed]