devc++ 编译这个程序报错
这是小弟在devc++ 下写的程序:#include<iostream>
#include<algorithm>
#include<functional>
using namespace std;
int main()
{
int a[5]={5,3,3,7,5};
int b[5];
reverse(a,a+5);
copy(a,a+5,ostream_iterator<int>(cout," "));
return 0;
} 这个程序编译不了,错误出现在 ostream_iterator<int>,提示是`ostream_iterator' undeclared (first use this function)
(Each undeclared identifier is reported only once for each function it appears in.),但是这个程序在vc6.0下运行正确
求高手指点一二
[ 本帖最后由 zhangtuo08 于 2011-2-10 16:26 编辑 ]