M
Martin Magnusson
I'm writing a custom iterator which works on a specific class and needs
access to some of this class' private data. The iterator class is a
friend of the other class, but I suppose that the iterator also needs a
pointer to the object over which it iterates.
My question is: what's the easiest way to supply this pointer? It seems
slightly cumbersome to have to do something like
Vertex_Iterator i( this );
everytime I create a new Vertex_Iterator.
Is there a better way?
/ martin
access to some of this class' private data. The iterator class is a
friend of the other class, but I suppose that the iterator also needs a
pointer to the object over which it iterates.
My question is: what's the easiest way to supply this pointer? It seems
slightly cumbersome to have to do something like
Vertex_Iterator i( this );
everytime I create a new Vertex_Iterator.
Is there a better way?
/ martin