Скажите, что у меня есть класс A и класс B, которые выглядят так: < /p>
Class A
{
private:
int a;
public :
bool operator==(const A &) const;
//other methods(...)
}
Class B
{
private:
std::vector v;
public:
std::vector &get_v() {return v;};
const std::vector& get_v() const;
}
< /code>
Теперь, когда я это делаю: < /p>
B b;
std::vector::iterator it;
it=std::find (b.get_v().begin(), b.get_v().end(), an item of class A);
< /code>
Ошибка, которую я получаю, < /p>
error: no matching function for call to 'find(std::vector::iterator, std::vector::iterator, A&)
< /code>
Я что -то упускаю? Спасибо
Подробнее здесь: https://stackoverflow.com/questions/216 ... g-function
Std :: find 'error no matching function' ⇐ C++
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
Основы функции - Function Function Function, выходящая из INT, более 99 [закрыто]
Anonymous » » в форуме Python - 0 Ответы
- 29 Просмотры
-
Последнее сообщение Anonymous
-