This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: const_iterator oddness?
- To: Michael Vance <briareos at lokigames dot com>
- Subject: Re: const_iterator oddness?
- From: Daniel Berlin <dan at cgsoftware dot com>
- Date: Wed, 14 Jun 2000 16:43:09 -0700 (PDT)
- cc: gcc at gcc dot gnu dot org
I could be wrong, but T isn't really a typename.
Try "class T".
The typename, if anything, is T::const_iterator.
On Wed, 14 Jun 2000, Michael Vance wrote:
> #include <vector>
>
> template<typename T>
> void poor_jim( const char* s, const T& p )
> {
>
> for( T::const_iterator i = p.begin( ); i != p.end( ); i++ ) {
> cout << *i << endl;
> }
>
> }
>
> int main( int argc, char* argv[] )
> {
> return 0;
> }