code:
// // author: lin yiqian
// created: 2009/08/24
// describe: stl multiset 使用demo
// #include
#include
using
namespace std;
typedef multiset int_mset;
// 列印set
void printset(int_mset setint)
cout << endl;
}
// 反向列印set
void printsetreverse(int_mset setint)
cout << endl;
}
// 列印指定範圍的set
void printsetrange(int_mset setint, int_mset::value_type low, int_mset::value_type up)
cout << endl;
}
void main(void)
// test insert() again
// reverse()
// range()
// size() & max_size()
// empty()
// find()
// count()
// clear()
system("pause");
}
STL容器使用DEMO vector
code author lin yiqian created 2009 08 24 describe stl vector 使用demo include include using namespace std typedef vector int vec 列印vector void printvec...
STL容器使用DEMO multimap
code author lin yiqian created 2009 08 24 describe stl multimap 使用demo include include include using namespace std typedef multimap str mmap 列印multima...
STL容器使用總結
include include include include include include 優先佇列,大的元素自動排在隊頭 include key唯一,重複會覆蓋 多重對映,允許有重複的key include 集合 相當於沒有value的對映using namespace std void pu...