topical media & game development 
  
 
 
 
 
  
    
    
  
professional-program-23-WritingAlgorithms-IteratorTraitsTest.c
? / 
professional-program-23-WritingAlgorithms-IteratorTraitsTest.c
  include <vector>
  include <iterator>
  include <iostream>
  using std::vector;
  using std::cout;
  using std::endl;
  
  template <typename IteratorType>
  void iteratorTraitsTest(IteratorType it)
  {
    typename std::iterator_traits<IteratorType>::value_type temp;
    temp = *it;
    cout << temp << endl;
  }
  
  int main(int argc, char** argv)
  {
    vector<int> v;
    v.push_back(5);
    iteratorTraitsTest(v.begin());
  
    return (0);
  }
  
  
  
(C) Æliens 
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. 
In case of other copyright issues, contact the author.