Comparing two different classes

C

Christopher

I have a vector of class A objects
I also have a vector of class B objects.

Class B contains some data describing to me what kind of Class A is
acceptable for insertion into a new subset of class A objects.

Is there a way to use a functor or something to get iterators to all
the class A objects that meet the criteria described to me by class B?

For example, we could say class A just contains integral numbers and
class B just contains a bool prime or not prime. What construct would
I use to take a class B and give me back all class As that meet the
criteria?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top