C++ implementation of BST and various operations on it