#include<string>
#include<iostream>
#include<algorithm>
#include<vector>
#include<iterator>
#include<fstream>
using namespace std;
int main()
{
istream_iterator<int> cin_it(cin);
istream_iterator<int> end_of_stream;
vector<int> vec(cin_it,end_of_stream);
sort(vec.begin(),vec.end());
ostream_iterator<int> output(cout," ");
unique_copy(vec.begin(),vec.end(),output);
}
编译时出现这个错误--------------------Configuration: a - Win32 Debug--------------------
Compiling...
a.cpp
E:\C\a.cpp(13) : error C2664: '__thiscall std::vector<int,class std::allocator<int> >::std::vector<int,class std::allocator<int> >(unsigned int,const int &,const class std::allocator<int> &)' : cannot convert parameter 1 from 'class std::istream_ite
rator<int,char,struct std::char_traits<char> >' to 'unsigned int'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
E:\C\a.cpp(17) : warning C4508: 'main' : function should return a value; 'void' return type assumed
执行 cl.exe 时出错.
a.exe - 1 error(s), 0 warning(s)
大家帮我看看怎么改改