STL — 关联容器

来源:互联网 发布:unix环境高级编程源码 编辑:程序博客网 时间:2024/05/21 09:16

一:Set 类型

Set 只是单纯的键的集合,

1、添加元素

s.insert(" the ");

s.insert(s1.begin(),s2.begin());

2、从set中获取元素

set<int >::iterator it = s.find(" the ");

int i=s.count(" the ");


http://blog.csdn.net/heyutao007/article/details/6937236

0 0
原创粉丝点击