阅读程序——4
来源:互联网 发布:android 存储数据 编辑:程序博客网 时间:2024/06/08 01:17
问题及代码:
/*copyright(c)2016.烟台大学计算机学院 * All rights reserved, * 文件名称:text.Cpp * 作者:李一波 * 完成日期:2016年6月6日 * 版本号:codeblocks * * 问题描述: * 输入描述: * 程序输出: */#include <string>#include <set>#include <iterator>#include <iostream>using namespace std;int main(){ set <string> strset;//set是STL关联容器 strset.insert("cantaloupes");//在strset中插入字符串然后在进行排序 strset.insert("grapes"); strset.insert("apple"); strset.insert("orange"); strset.insert("banana"); strset.insert("grapes"); copy(strset.begin(), strset.end(), ostream_iterator<string>(cout, " "));//输出strset中的字符串 cout << endl; return 0;}
运行结果:
0 0
- 阅读程序——4
- 第十五周阅读程序——4
- 第十二周—阅读程序(4)
- 第十二周—阅读程序(4)
- 第十五周项目—阅读程序(4)
- 第十五周项目—阅读程序(4)
- 第十二周阅读程序——补充阅读
- 第十二周项目一——阅读程序(4)
- 第十二周项目一——程序阅读(4)
- 第十二周项目一——阅读程序(4)
- 第16周阅读程序——4(1)
- 第16周阅读程序——4(2)
- 第16周阅读程序——4(3)
- 第16周项目——阅读程序4
- 第五周 程序阅读——const
- 第十四周阅读程序——1
- 第十四周阅读程序——2
- 第十四周阅读程序——3
- 很全的ABAP入门资料(待整理)
- MathType怎么编辑双箭头
- STL源码剖析——迭代器的分类与使用方法
- Linux下 *.tar.gz文件解压缩命令
- 获取 Activity 的返回参数
- 阅读程序——4
- MySQL常用的SQL查询语句
- ios开发中如何隐藏各种bar
- 百度地图定位demo
- 复制一个文件夹的内容到另外一个文件夹,利用递归
- Dagger2中发生android.app.Activity is bound multiple times:
- UIGraphicsGetCurrentContext()的使用
- 第十五周C++范型程序补充阅读(2)
- LeetCode-70.Climbing Stairs