Hi,
I'm trying to get some example code to work, but I'm getting two errors:
error C2065: 'istream_interator' : undeclared identifier
error C2062: type 'int' unexpected
Code:#include <iostream> #include <vector> #include <iterator> using namespace std; template<typename Iter> void display(Iter start, Iter end) { while(start != end) { cout<<*start++<<endl; } } int main() { int nums[] = {1, 2, 3}; display(nums, nums + 3); cout<<"enter some ints:"<<endl; display( istream_iterator<int>(cin), istream_interator<int>() ); //ERROR return 0; }



LinkBack URL
About LinkBacks




