Re: trying to declare an iterator for a std::vector of template pointers

From: Steffen Jakob (steffen_removethis_at_jakob.at)
Date: 03/27/05


Date: Sun, 27 Mar 2005 20:23:44 GMT

Am Sun, 27 Mar 2005 11:48:35 -0800 schrieb Ken Cecka:

> #include <vector>
>
> template <typename T>
> class Class
> {
> };
>
> template <typename T>
> class Container
> {
> public:
> typedef Class<T> * ClassPointer;
> typedef std::vector<ClassPointer> ClassVector;
> typedef ClassVector::iterator ClassVectorIterator;
> };
>
> int main(void)
> {
> return 0;
> }
 
//
> Can anyone tell me if/how to declare an iterator to a vector of template
> pointers?

Yes:

typedef typename ClassVector::iterator ClassVectorIterator;

> Thanks in advance for any help!

Greetings,
Steffen.



Relevant Pages