const_iterator oddness?

Daniel Berlin dan@cgsoftware.com
Wed Jun 14 16:43:00 GMT 2000


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;
> }



More information about the Gcc mailing list