fork download
  1. #include <iostream>
  2. #include <vector>
  3. #include <iterator>
  4. #include <algorithm>
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. typedef istream_iterator<int> intIt;
  10. vector<int> numbers(intIt(cin), intIt());
  11.  
  12. copy(numbers.begin(), numbers.end(), ostream_iterator<int>(cout, "; "));
  13. }
  14.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
1 2 55454 d 6
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:12: error: request for member ‘begin’ in ‘numbers’, which is of non-class type ‘std::vector<int, std::allocator<int> > ()(main()::intIt, main()::intIt (*)())’
prog.cpp:12: error: request for member ‘end’ in ‘numbers’, which is of non-class type ‘std::vector<int, std::allocator<int> > ()(main()::intIt, main()::intIt (*)())’
stdout
Standard output is empty