C++ std_pair用法
来源:互联网 发布:淘宝新手开店视频教程 编辑:程序博客网 时间:2024/06/05 09:56
#include <iostream>#include <utility>#include <string>using namespace std;int main () { pair <string,double> product1 ("tomatoes",3.25); pair <string,double> product2; pair <string,double> product3; product2.first = "lightbulbs"; // type of first is string product2.second = 0.99; // type of second is double product3 = make_pair ("shoes",20.0); cout << "The price of " << product1.first << " is $" << product1.second << "\n"; cout << "The price of " << product2.first << " is $" << product2.second << "\n"; cout << "The price of " << product3.first << " is $" << product3.second << "\n"; return 0;}
0 0
- C++ std_pair用法
- 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"用法解析
- 创建菜单;MAKEINTRESOURCE;菜单加入窗口的两种方式
- TextView自定义换行
- C++ fatal error LNK1104
- BZOJ 1433: [ZJOI2009]假期的宿舍
- java多线程
- C++ std_pair用法
- 深入理解-imooc 滚动显示效果制作
- Connection:Keep-Alive 和 Transfer-Encoding: chunk
- 引用与指针的区别
- C++ 类的使用
- ZSTU4239-巴比伦花园
- Google Analytics中analytics.js的使用
- C++ 类的相关语法,符号:和::的用法
- [Kaggle] 数据建模分析与竞赛平台介绍