stl accumulate transform
来源:互联网 发布:梦幻服战号价格 知乎 编辑:程序博客网 时间:2024/05/17 11:36
#include<algorithm>#include<numeric>#include<string>#include<vector>#include<iostream>using namespace std;void main(){//整数累加int a[4]={12,34,44,55}; vector<int> aint(a,a+4);int num = accumulate(aint.begin(),aint.end(),0); //0为初始值cout<<num<<endl;//字符串累加string s[4]={"shao","zhang","he","wang"};vector<string> str(s,s+4);string nstring = accumulate(str.begin(),str.end(),string(""));cout<<nstring<<endl;}
#include<string>#include<iostream>#include<algorithm>using namespace std;void main(){ string s("Welcome To Web Site!"); transform(s.begin(),s.end(),s.begin(),toupper);//字母转大写 cout<<s<<endl;}
0 0
- stl accumulate transform
- STL-----------accumulate
- STL:accumulate
- STL accumulate
- std::transform || inner_product || accumulate
- STL accumulate demo
- STL之accumulate
- c++STL之accumulate
- stl中的accumulate算法
- STL transform
- STL:transform
- STL泛型算法--accumulate()
- STL:accumulate与自定义数据类型
- STL算法——accumulate
- STL accumulate计算自定义结构类型
- accumulate, copy, vector::push_back(STL Sample)
- STL中accumulate函数的使用
- STL中accumulate函数的使用
- void及void指针含义的深刻解析
- LCD深度剖析
- iPhone UITableView
- 第11周工作计划表
- poj2109 ISBN
- stl accumulate transform
- 常用的linux程序
- MYSQL使用inner join 进行 查询/删除/修改示例
- 过滤器 grep
- 正确地设置安卓通知栏图标尺寸
- Linux下的signal信号机制
- struts2 拦截器实现
- Linux守护进程的编写
- android之---AlertDialog详解