Hey everybody,
Could somebody please provide an example for using the STL find_if for the following task. I am trying to search a vector of structs, using the following criteria: compare whether the key of the struct in the vector matches the key of another struct (instace of the same type of struct) that I want to find. So basically search the vector for a particular struct. I want to use find_if, in order to replace the handwritten routine I have now. I have seen many complex, examples online. If anybody knows of simple and clean way, please share. Thanks in advance.
MIGSoft
0
Posting Pro in Training
Recommended Answers
Jump to PostLoop through the vector of objects, if that object matches the one in hand return a success message?
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.