- //文件名:CHAPTER8-31.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 or equal to list c2." << endl;
- else
- cout << "List c1 is greater than list c2." << endl;
- return 0;
- }