c++ inseter 用法
来源:互联网 发布:电子地图 数据采集 编辑:程序博客网 时间:2024/05/01 06:58
#include<iostream>
#include<cmath>
#include<iterator>
#include<vector>
using namespace std;
int main()
{
vector<int> a;
int i;
for(i = 1; i < 10; i++)a.push_back(i);
vector<int> b,c;
b.push_back(-1);
c.push_back(-1);
copy(a.begin(), a.end(), b.begin() );
copy(a.begin(), a.end(), inserter(c, c.begin()) );
cout << "normal copy:";
copy(b.begin(), b.end(), ostream_iterator<int>(cout, " ") );
cout <<endl;
cout << "inserter copy:";
copy(c.begin(), c.end(), ostream_iterator<int>(cout, " ") );
cout << endl;
system("pause");
}
- c++ inseter 用法
- c#$用法
- c#$用法
- static用法(C/C++)
- const用法(C/C++)
- C/C++__typedef用法
- C/C++:学习用法一 sizeof 用法
- [C/C++]#ifndef,#define用法
- [C/C++]#ifndef,#define用法
- [C/C++]#ifndef,#define用法
- c++/c 函数指针用法
- C/C++sort函数用法
- C/C++:rand()的用法
- C/C++/MFC时间用法
- c++/c static 用法总结
- [C/C++]#ifndef,#define用法
- C ++ extern "C"的用法
- C++:extern "c"用法解析
- ASP.NET中存取图片到数据库的示例
- Using virtual lists
- 多重继承与虚函数
- 搞定Fixed Column Table
- fileupload上传代码
- c++ inseter 用法
- Object Slice(对象切割),很令人头晕的东西!
- 减少装箱(Boxing)和拆箱(Unboxing)操作(感觉有用,抄过来的)
- Cisco Switching Mode Discussion(五种交换模式辨析)
- 验证交换机STP选举过程
- 信息增益的概念
- 《Windows程序设计》读书笔记------------->>鼠标基础和显示区域鼠标消息<<
- C#文件处理
- 网页配色表[html版]