I have a class A
with a member which is a vector of object pointers of another class B
class A
{
std::vector m_member_A
<
If you want to find a value pointer at by the pointer, instead of a given pointer, you can use std::find_if
with a suitable functor:
struct Foo
{
int i;
};
bool operator==(const Foo& lhs, const Foo& rhs) { return lhs.i == rhs.i; }
std::vector v = ....;
Foo f{42};
std::find_if(v.begin(), v.end(), [&f](const Foo* p) { return *p == f; });