[BLL] How to search in a list for an object comparing a data member?
31 Oct
2003
31 Oct
'03
7:54 a.m.
Hi all, What I want to achieve is a code similar to this: struct Foo { int fDataMember;} int main() { std::vector<Foo> foos; Foo fo; std::find_if(foos.begin(), foos.end(), _1->fDataMember == fo.fDataMember); //<-- won't compile; } I know I could use a functor object but this is just an example for a more general need. Thanks, Gianluca
7697
Age (days ago)
7697
Last active (days ago)
0 comments
1 participants
participants (1)
-
Gianluca Silvestri