C
Christopher
How do I use std::find_if with a predicate that takes an argument?
For example,
If I have a vector of pointers to classes that contain ints
I want to search for the first occurence a class containing, the
number 7
Later, I want to search for the first occurence of a class in the same
vector, containg the numer 5
Where the number is the argument I want to pass to the predicate
In my real code the argument is a string
The vector contains smart pointers to classes that contain a string
amongst other things.
I am searching for the first occurence that have one string
Then I am changing the string and searching.
For example,
If I have a vector of pointers to classes that contain ints
I want to search for the first occurence a class containing, the
number 7
Later, I want to search for the first occurence of a class in the same
vector, containg the numer 5
Where the number is the argument I want to pass to the predicate
In my real code the argument is a string
The vector contains smart pointers to classes that contain a string
amongst other things.
I am searching for the first occurence that have one string
Then I am changing the string and searching.