I tried to implement a simple BST with a member of class that insert a value into the tree. I followed the snipping code like below:
class BST {
public:
int value;
BST* left;
BST* right;
BST(int val);
BST& insert(int val);
};
But I don't understand what the return type BST& means. What does it mean ?