From: Oscar F. <of...@wa...> - 2002-12-02 21:36:39
|
"Al Stevens" <al...@al...> writes: > std::istream_iterator and std::ostream_iterator are missing from 3.2. They > were included in 2.93 and earlier. They are still defined in the Standard. > What happened? This program (taken from the Rogue Wave STL docs) works ok. I think your installation is corrupted. #include <iterator> #include <numeric> #include <deque> #include <iostream> using namespace std; int main () { int arr[4] = { 3,4,7,8 }; int total=0; deque<int> d(arr+0, arr+4); copy(d.begin(),d.end()-1, ostream_iterator<int,char>(cout," + ")); cout << *(d.end()-1) << " = " << accumulate(d.begin(),d.end(),total) << endl; return 0; } -- Oscar |