This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: const_iterator oddness?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]