sort, search - c++