函数声明功能介绍pair insert ( const value_type& x )在set中插入元素x,实际插入的是构成的 键值对,如果插入成功,返回的元素的个数(set.count()只等于0或1)map描述翻译:map是关联容器,它按照特定的次序(按照key来比较)存储由键值key和值value组合而成的元素。...#include void TestSet(){ int array[] = { 2, 1, 3, 9, 6, 0, 5, 8, 4, 7 }; // 注意:multiset在底层实际存储的是...struct pair {typedef T1 first_type; typedef T2 second_type;T1 first;T2 second;pair(): first(T1(www.laipuhuo.com...)), second(T2()) {}pair(const T1& a, const T2& b): first(a), second(b) {}};