帮忙看看那里出错了!
刚开始学c++,菜鸟一个,海望大家以后多帮忙!为什么输入eof时,不能推出!
#include <iterator>
#include <iostream>
#include<algorithm>
#include<numeric>
#include<string>
using namespace std;
int main()
{
ostream_iterator<string> out_iter(cout,"\n");
istream_iterator<string> in_iter(cin),eof;
while(in_iter!=eof)
{
*out_iter=*in_iter;
in_iter++;
out_iter++;
}
return 0;
}