I want to find in a vector of Object pointers for a matching object. Here\'s a sample code to illustrate my problem:
class A {
public:
A(string a):_a(a) {}
Either use std::find_if and provide a suitable predicate yourself, see other answers for an example of this.
Or as an alternative have a look at boost::ptr_vector, which provides transparent reference access to elements which are really stored as pointers (as an extra bonus, memory management is handled for you as well)