Error C2064, how to fix it?

I wrote long code, and there are a lot of void functions in it. there is only one int function, which finds smallest. I tried to compile it and error c2064 occur, and said
no match for call to '(std::string) (std::string [10], int&, int&)
what does it mean? and how do I fix it?
below is the int smallest function and it's declaration.
1
2
3
else if (inputCMD == "smallest") {
    cout << smallest(Arr, lowerBound, upperBound);
} 

1
2
3
4
5
6
7
8
9
10
11
int smallest(const string source[], int low, int high) {
    string smallest = source[low];
    int smallestIdx = low;
    for (int i = low+1; i <= high; i++) {
        if (source[i] < smallest) {
            smallest = source[i];
            smallestIdx = i;
        }
    }
    return smallestIdx;
}
hint:


... int&, int&)

does not match
 
.. , int low, int high)
you have string smallest somewhere before your code snippet.
@MiiNiPaa
Thanks, ill try to compile it again after fixing it
@MiiNiPaa
Thank you so much, I fixed it
Topic archived. No new replies allowed.