I'm trying to figure out a nice way to find the index of a certain object in a vector - by comparing a string to a member field in the object.

Like this:

find(vector.begin(), vector.end(), [object where obj.getName() == myString])

I have searched without success - maybe I don't fully understand what to look for.

Edit
Report