c++标准库pair小例
来源:互联网 发布:windows lua环境变量 编辑:程序博客网 时间:2024/06/05 07:18
#include <iostream>#include <utility>#include <string>using namespace std;pair<int,string> func(int a, string s) {return make_pair(a,s);}int main() {pair<int, string> t = func(1314, "I love you");cout << get<0>(t) << endl;//获得第一个数cout << get<1>(t) << endl;//获得第二个数//修改他们的第一个数的值get<0>(t) = 1314520;cout << get<0>(t) << endl;//获得第一个数cout << get<1>(t) << endl;//获得第二个数system("pause");return 0;}
阅读全文
0 0
- c++标准库pair小例
- C++标准库pair
- C++标准库pair
- [C/C++标准库]_[初级]_[实用类std::pair]
- 标准模板库pair的理解
- C++ Primer 有感(标准库pair)
- C++标准库---pair用法及实现
- 标准模板库(STL)使用---pair
- c++map、set和pair使用小技巧
- c++标准库——pair和tuple
- 【C/C++】STL--pair
- C++标准库tuple小例
- C++pair容器
- C++STL学习Pair
- c++pair的用法
- C++pair的用法
- pair (c++)
- [C++]Pair简介
- 深度详解Retrofit2使用(二)实践
- 代码的哲学(c/c++):从常量到变量
- shell脚本中echo显示内容带颜色
- dozer的基本用法
- webpack01-认识webpack
- c++标准库pair小例
- 滚动条循环,判断滚动条滚动到底部
- 深度学习系列1
- 企业级项目高并发处理方案
- NIO 文件乱码问题解决
- idea热部署(更新jsp代码不用重启tomcat)
- Openresty最佳案例 | 第1篇:Nginx介绍
- 二叉树的遍历详解
- pat b 1031 查验身份证