// testOutputIterator.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include #include #include int _tmain(int argc, _TCHAR* argv[]) { #if 0 std::vector v; std::vector::iterator ot = v.begin(); *++ot = 1; *++ot = 2; *++ot = 3; *++ot = 4; #endif std::list l; l.push_back( 1 ); l.push_back( 2 ); // l.splice( l.begin(), l, l.begin() ); std::cout << &(*l.begin()) << " " << &(*++l.begin()) << " " << *l.begin() << " " << *++l.begin() << std::endl; std::swap( l.begin(), ++l.begin() ); std::cout << &(*l.begin()) << " " << &(*++l.begin()) << " " << *l.begin() << " " << *++l.begin() << std::endl; return 0; }