#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
istream_iterator<int> is(cin);
istream_iterator<int> eof;
vector<int> ivec;
copy(is, eof, back_inserter(ivec));
sort(ivec.begin(), ivec.end());
ostream_iterator<int> os(cout, " ");
copy(ivec.begin(), ivec.end(), os);
getchar();
return 0;
}
c++ STL istream_iterator<> demo
最新推荐文章于 2020-08-19 13:42:49 发布