B
brekehan
If I have a class
MyClass
{
...bunch o data and methods
int x;
};
and a stl container of MyClass objects
Is there a way to use std::find to get all the elements whose member x
is of om value?
All the example on the net are of a collection of some built in type
for simplicity, but do not show how to use a member of your own type
as the value being sought.
MyClass
{
...bunch o data and methods
int x;
};
and a stl container of MyClass objects
Is there a way to use std::find to get all the elements whose member x
is of om value?
All the example on the net are of a collection of some built in type
for simplicity, but do not show how to use a member of your own type
as the value being sought.