//myListPopBackFront.cpp #include #include #include using namespace std; int main() { string str1[] = {"New","A", "B", "C","D"}; string str2[] = {"E", "F", "G","H", "New"}; list Lstr1(str1, str1+5); list Lstr2(str2, str2+5); // cout<<"\n Lstr1.size() : " << Lstr1.size() <:: iterator it; cout<<"\n Original Lstr1 \n"; for(it= Lstr1.begin(); it !=Lstr1.end(); it++) { cout <<" "<< *it; } cout<<"\n Lstr1 Front " << Lstr1.front(); cout<<"\n Lstr1.back " << Lstr1.back()<\n "; cout<<"\n ->pop front Lstr1 \n"; for(it= Lstr1.begin(); it !=Lstr1.end(); it++) { cout <<" "<< *it; } cout<<"\n Lstr1 Front " << Lstr1.front(); cout<<"\n Lstr1.back " << Lstr1.back()<pop back Lstr2 "<< endl; for(it= Lstr2.begin(); it !=Lstr2.end(); it++) { cout <<" "<< *it; } return 0; }