0
why "[]" operands is not working with vectors?
my line of code vector<int>::iterator ti = find(p.begin(),p.end(),p[it]); error: "no operator \"[]\" matches these operands -- operand types are: std::vector<int, std::allocator<int>> [ std::_Vector_iterator<std::_Vector_val<std::conditional_t<true, std::_Simple_types<int>, std::_Vec_iter_types<int, size_t, ptrdiff_t, int *, const int *, int &, const int &>>>> ]", "startLineNumber": 15, "startColumn": 56, "endLineNumber": 15, "endColumn": 56 }
3 Antworten
+ 1
What is 'it' in p[it]? Error says 'it' is not int. Please share some more code snippet.
0
I didn't found find call