Question:
Why does a simple program such as the following produce compilation errors?
#include#include using namespace std;int main(){ ostream_iterator os(cout); vector vi(3,0); os=vi[0]; os++; os=vi[1]; return 0;}
I use the Microsoft Visual Studio compiler and it gives me an error message: ostream_iterator:undeclared identifier.
Please help.
Answer:
There’s a bug in Visual C++. Your code is fine (except for the misspelled