- //文件名:CHAPTER8-29.cpp
- #include <list>
- #include <iostream>
- int main( )
- {
- using namespace std;
- list <int> c1, c2;
- c1.push_back( 1 );
- c1.push_back( 2 );
- c1.push_back( 4 );
- c2.push_back( 1 );
- c2.push_back( 3 );
- if ( c1 < c2 )
- cout << "List c1 is less than list c2." << endl;
- else
- cout << "List c1 is not less than list c2." << endl;
- return 0;
- }