#include #include #include using namespace std; const string VIIVA = "------------------------------------------------------------\n"; /****************************************************************************/ int main(void) { cout << VIIVA; list lc; lc.push_back('a'); lc.push_back('b'); lc.push_back('c'); lc.push_back('d'); lc.push_back('k'); lc.push_back('i'); lc.push_back('f'); lc.push_front('e'); list::iterator lci; for (lci=lc.begin(); lci != lc.end(); lci++) cout << *lci << " "; // e a b c d k i f cout << "\n" << VIIVA; lc.sort(); for (lci=lc.begin(); lci != lc.end(); lci++) cout << *lci << " "; // a b c d e f i k cout << "\n" << VIIVA; return 0; }