custom iterator for multiple arrays

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • raj

    custom iterator for multiple arrays

    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
Working...