// C++ program to demonstrate the use of list containers #include #include using namespace std; template void showList( list listObject) { //TO DO //Print out the items of the list using an iterator // typename T x1 ; list x2 ; class list::iterator it; for (it = listObject.begin(); it != listObject.end(); ++it) { cout << *it << " "; } cout << endl; } int main() { // defining list list listobj{}; //use push_back and push_front to //push some strings. //print the list using the //showList function showList ( listobj ) ; return 0; }