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
- Next message: Ken Cecka: "Re: trying to declare an iterator for a std::vector of template pointers"
- Previous message: Malte Starostik: "Re: Deconstructors"
- In reply to: Ken Cecka: "trying to declare an iterator for a std::vector of template pointers"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Next message: Ken Cecka: "Re: trying to declare an iterator for a std::vector of template pointers"
- Previous message: Malte Starostik: "Re: Deconstructors"
- In reply to: Ken Cecka: "trying to declare an iterator for a std::vector of template pointers"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|