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 compare values instead of comparing pointers, you might want to use std::find_if instead:
bool IsFoo (B* _item) {
bool result = false;
if ( _item != nullptr && _item->value == 1 ) //Whatever is your criteria
result = true;
return result;
}
std::vector m_member_A;
B* instance = std::find_if (m_member_A.begin(), m_member_A.end(), IsFoo);