Hi,
I have an octree class that I would like to (slowly) migrate to an
STL-like container. I now need to implement two forward iterators for the
class. I would like to use the iterators in the following manner:
octree<GLfloat> ::nodeIterator p;
octree<GLfloat> ::itemIterator q;
for (p=foo.begin(); p!=foo.end();p+ +)
{
// bleh
}
(or something reasonably similar). I have reviewed Stroustrup, but have
found the limited examples difficult to adapt to my need. Can anyone
provide an example of a simple container and its iterator?
Thanks,Brett
I have an octree class that I would like to (slowly) migrate to an
STL-like container. I now need to implement two forward iterators for the
class. I would like to use the iterators in the following manner:
octree<GLfloat> ::nodeIterator p;
octree<GLfloat> ::itemIterator q;
for (p=foo.begin(); p!=foo.end();p+ +)
{
// bleh
}
(or something reasonably similar). I have reviewed Stroustrup, but have
found the limited examples difficult to adapt to my need. Can anyone
provide an example of a simple container and its iterator?
Thanks,Brett
Comment