I am trying to make an iterator. As a constructor, I:
iterator(Node* node)
{
it = node;
}
and copy constructor:
iterator(const iterator& x)
{
it = x.it;
}
I was told that using the first one is not a good idea, and the second (which is better)
I am not sure how to use the second approach in such methods:
typedef iterator<Key, Info> ringIterator;
ringIterator begin()
{
return ringIterator(any);
}
source
share