kakalake
December 29th, 2002, 04:36 PM
Hello!
I have a general question. When i define an iterator what do the operator * have to return. For example: If i want to implement a string iterator like this...
template<class C>
class StringIt : public iterator<...>
{
};
What does the iterator-class have to return when i invoke the operator *. Must it be the element of the container ( in this example a reference of a char ) or something else? What do i have to use for the second template parameter for the inherited class iterator?
thanks
I have a general question. When i define an iterator what do the operator * have to return. For example: If i want to implement a string iterator like this...
template<class C>
class StringIt : public iterator<...>
{
};
What does the iterator-class have to return when i invoke the operator *. Must it be the element of the container ( in this example a reference of a char ) or something else? What do i have to use for the second template parameter for the inherited class iterator?
thanks