Question: What is the output of following code segment? ostream_iterator screen (cout, ); vector vecList; vector ::iterator vecIt; vecList.push_back(3); vecList.push_back(5); vecList.push_back(7); vecIt = vecList.begin();
What is the output of following code segment? ostream_iterator screen (cout, " "); vector vecList; vector ::iterator vecIt; vecList.push_back(3); vecList.push_back(5); vecList.push_back(7); vecIt = vecList.begin(); ++vecIt; vecList.erase (vecIt); vecList.push_back(9); copy (vecList.begin(), vecList.end(), screen); cout < < endl; for (int i=0; i
Step by Step Solution
3.45 Rating (155 Votes )
There are 3 Steps involved in it
It looks like theres a typo in the code a missing quote in the ostreamiterator ... View full answer
Get step-by-step solutions from verified subject matter experts
