custom iterator for multiple arrays

R

raj

Hey all

I have a base class that manages (Manager_class) different shapes.

It has different arrays of Circle_class, Square_class and etc etc.

All the shapes have a common base class Shape_class

What I want do is a for_each for every Shape_class in Manager_class
using std::for_each.

I guess I would to implement a customer iterator for my Manager_class
which would return the begin() of the first array and end() of the
last shape array. My question is how would I handle this situation
with multiple arrays.

Thanks
Raj
 

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

No members online now.

Forum statistics

Threads
474,145
Messages
2,570,824
Members
47,369
Latest member
FTMZ

Latest Threads

Top