Binary search tree assignment in C++