iterswp1.cpp
iterswp1.cpp
#include ‹stl.h›
#include ‹iostream.h›
int main() {
vector‹int› v1(6);
iota(v1.begin(), v1.end(), 0);
iter_swap(v1.begin(), v1.begin() + 3);
ostream_iterator‹int› iter(cout, " ");
copy(v1.begin(), v1.end(), iter);
cout ‹‹ endl;
return 0;
}