Adding the C++ version of TOSearch