set集合insert()函数运用实例

insert函数

语法:

insert()在集合中插入元素

源代码

测试代码

测试结果:

注:set容器会对重复元素去除,对元素进行排序(默认从小到大)