Advertisement
spacechase0

Iterators

Oct 28th, 2011
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.26 KB | None | 0 0
  1. template< typename T >
  2. class Iterator
  3. {
  4.     public:
  5.         Iterator& operator ++();
  6.         Iterator& operator --();
  7.         // Things like vectors would more +/- operators, but linked lists don't.
  8.        
  9.         bool operator == ();
  10.        
  11.         // And probably more.
  12.    
  13.     private:
  14.         T* ptr;
  15. };
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement