generic binary search for string case in c++ : I am a beginner.
I tried to find an answer, but I couldn't.
If I asked a duplicate question, I am sorry.
Here is my question.
I use template to do generic binary search, but in string case I cannot get the result. It keeps showing me error messeage of "error: no matching function for call to 'binarySearch(std::cxx11::string [11], int&, std::cxx11::string&)' " 
please help me out to understand Thanks!

    #include <iostream>
    #include <string>
    using namespace std;
    
    template <class T>
    T binarySearch(T arr[], int left, int right, T x)
    {
         if(right >= 1)
        {
            int mid = (left + right)/2;
            if(x == arr[mid])
            {
                return mid;
            }
            //right side of array
            else if(x > arr[mid])
            {
                return binarySearch(arr,mid+1,right,x);
            }
            //left side of array
            else
            {
                return binarySearch(arr,left,mid-1,x);
            }
        }
        else
            return -1;
    }
    
    int main()
    {
         int intArr[11] = {0,1,2,3,4,5,6,7,8,9,10};
         double doubleArr[11] = {1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0};
         string stringArr[11] = {"abc", "bcd", "cde", "def", "efg", "fgh", "ghi", "hij", "ijk", "jkl", "klm"};
         int length = sizeof(intArr)/sizeof(intArr[0]);
         cout << "binarySearch<int>(intArr,0,length,9): " << binarySearch<int>(intArr,0,length,9) << endl;
         cout << "binarySearch<double>(doubleArr,0,length,1.3): " << binarySearch<double>(doubleArr,0,length,1.3) << endl;
         string s = "cdf";
         cout << "binarySearch<string>(stringArr,length,cdf): " << binarySearch<string>(stringArr,length,s)) << endl;
    }


