What kinds of iterators of C++'s copy function requires? What about reverse or unique?
来源:互联网 发布:超人幻想 知乎 编辑:程序博客网 时间:2024/06/08 01:49
What kinds of iterators of C++'s copy function requires? What about reverse or unique?
STL的Copy:
前两个参数确定源数据的复制范围[first,last)。第三个参数是目标数据的起始位置。
这里的参数不一定非要是迭代器,也可以是普通的指向数组的指针。
需要注意的是Copy不支持自复制也就是第三个参数dest所指的位置在[first, last)范围内是不行的。copy
: first and second are Input iterators, last is Output iterators.(前两个参数为输入迭代器,只读。最后一个为输出迭代器,只写)reverse
: Bidirectional iterators.(双向迭代器)unique
: Forward iterators.(前向迭代器)
算法sort要求随机访问迭代器。array、deque、string、vector的迭代器都是随机访问迭代器,用于访问内置数组元素的指针也是。
0 0
- What kinds of iterators of C++'s copy function requires? What about reverse or unique?
- what's the function of pid file?
- What 's of entrepreneurship?
- Linux and C[2]: What is the function of inet_aton or inet ntoa ?
- What's the returned value of javascript constructor function
- What are the different kinds of parsers used in XML?
- [python] What kinds of global value mutation are thread-safe?
- What’s the point of usability testing?
- what's the meaning of these numbers?
- What's the point of DeferWindowPos?
- What's Quality of service (QoS)?
- What's clustered index of sql server
- what's the meaning of Shell?
- What's the meaning of EOF ?
- What's the point of DeferWindowPos?
- what's the meaning of BPM?
- what's the meaning of IFS
- What's the point of _MERGE_PROXYSTUB?
- 查看MariaDB(MYSQL)数据库中用户及其拥有权限
- 在线数据迁移经验:如何为正在飞行的飞机更换引擎
- Tricks(二十一)—— 随机数
- Inventor API: 2017版本支持3D PDF
- SQL server 2005安装详记
- What kinds of iterators of C++'s copy function requires? What about reverse or unique?
- 关于使用iOS scrollView进行图片浏览的坐标问题
- 旋转数组最小值
- 百宝云开源按键安卓注册码系统【按键安卓专版源码下载】
- 用Java发起HTTP请求与获取状态码(含状态码列表)
- Spring AOP 实现原理
- IOS开发数据存储篇—libsqlite3和FMDB的基本使用和区别
- 判断18位以内的数是否为素数 较大数质数判定
- loadrunner报表分析