// C++ program to demonstrate the use of list containers #include #include using namespace std; int main() { // defining list list gqlist{12,45,8,6}; //gqlist.insert( 1, 14, 1 ) ; for (auto i1 : gqlist) { cout << i1 << ' '; } //gqlist. list::iterator it = gqlist.begin(); advance(it, 2) ; gqlist.insert( it, 1, 14 ) ; for (int i1 = 0; i1 < 2; ++i1 ) { gqlist.push_back( i1 * 2 ); gqlist.push_front( i1 * 3 ); } cout << endl ; for (auto i1 : gqlist) { cout << i1 << ' '; } return 0; }