
往集合中加入值,则使用insert函数。查询某个元素在集合中是否存在,则使用count函数。
http://kb.cnblogs.com/a/1626127/
亮点:
pair<iterator, bool> insert(const value_type& x)
将一个元素插入当前set容器。返回值pair的第一个元素,表示插入位置的迭代器;第二个元素,表示是否插入到容器中,只有该值为true,迭代器才有效。 iterator insert(iterator position, const value_type& x)
将值x插入当前容器中,然会新元素位置。position是个提示,指出插入操作的搜寻起点。如果提示恰当,可大大加快速度。 template <class InputIterator>
void insert(InputIterator first, InputIterator last)
将迭代器[first,last)指代的元素插入当前容器中。
HxLauncher: Launch Android applications by voice commands