으로 문자열 비교에 대해 나는 다음과 같은 코드로, 문자열 유형에 따라 을 문자 비교하여 문자를 만들려고 :문자열
vector <int> getQuality(string seedTag, vector <string> &MuTag) {
vector <int> Quals;
for (unsigned i = 0; i<MuTag.size(); i++) {
Quals.push_back(-40);
cout << MuTag[i] << " " << seedTag[i] << endl;
if (MuTag[i] == seedTag[i]) { // This line 33 with error
Quals.push_back(40);
}
}
return Quals;
}
그러나이 같은 오류가 있습니다 이유 :
Mycode.cc:33: error: no match for 'operator==' in '(+ MuTag)->std::vector<_Tp, _Alloc>::operator[] [with _Tp = std::string, _Alloc = std::allocator<std::string>](((long unsigned int)i)) == seedTag. std::basic_string<_CharT, _Traits, _Alloc>::operator[] [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>](((long unsigned int)i)
을 어떻게 할 수 그것을 해결할 수 있습니까?
유머러스러스 한 +1 – HRJ