- //文件名:CHAPTER9-11.cpp
- #include <set>
- #include <iostream>
- #if _MSC_VER > 1020 // if VC++ version is > 4.2
- using namespace std; // std c++ libs implemented in std
- #endif
- int main( )
- {
- set <int> s1, s2;
- s1.insert ( 1 );
- if ( s1.empty( ) )
- cout << "The set s1 is empty." << endl;
- else
- cout << "The set s1 is not empty." << endl;
- if ( s2.empty( ) )
- cout << "The set s2 is empty." << endl;
- else
- cout << "The set s2 is not empty." << endl;
- }