programmed binary c++ search