I'm trying to use the algorithm Search() with strings.
I get an error at the line where i marked.
Could somebody please give me a hint what am i doing wrong? Thanks in advance!
Sorry for the typo: algorithm.Code:int main () { vector<string> myvector ; vector<int>::iterator it; string str = "search"; string match = "ea"; myvector.push_back(str); it = search (myvector.begin(), myvector.end(), match.begin(), match.end()); // error if (it != myvector.end()) cout << "Match found at position: " << int(it - myvector.begin()) << endl; else cout << "Match not found." << endl; system("pause"); return 0; }



LinkBack URL
About LinkBacks



