博客
关于我
STL pair
阅读量:359 次
发布时间:2019-03-04

本文共 833 字,大约阅读时间需要 2 分钟。

 

 

#include
#include
#include
using namespace std;int main(){ pair
p; p.first="haha"; p.second=5; //或者pair
p("haha",5); cout<
<<" "<
<
("haha",5) //法二:make_pair("haha",5); p=make_pair("xixi",55); cout<
<<" "<
<
("heihei",5); cout<
<<" "<
<
,>= //先以first的大小作为标准,相等时判断second的大小 pair
p1(5,10); pair
p2(5,15); pair
p3(10,5); if(p1

 

#include
#include
#include
using namespace std;int main(){ pair
p; p.first="haha"; p.second=5; //或者pair
p("haha",5); cout<
<<" "<
<
("haha",5) //法二:make_pair("haha",5); p=make_pair("xixi",55); cout<
<<" "<
<
("heihei",5); cout<
<<" "<
<
,>= //先以first的大小作为标准,相等时判断second的大小 pair
p1(5,10); pair
p2(5,15); pair
p3(10,5); if(p1

结果: 

 

 

转载地址:http://ncfr.baihongyu.com/

你可能感兴趣的文章
Mysql的timestamp(时间戳)详解以及2038问题的解决方案
查看>>
mysql的函数操作
查看>>
MySql的创建数据表、约束、外键约束的创建修改删除、级联操作
查看>>
MySQL的常见命令
查看>>
mysql的数据类型有哪些?
查看>>
MySQL的错误:No query specified
查看>>
mysql社工库搭建教程_社工库的搭建思路与代码实现
查看>>
mysql索引
查看>>
mysql索引
查看>>
mysql索引、索引优化(这一篇包括所有)
查看>>
MySql索引为什么使用B+树
查看>>
WARNING!VisualDDK wizard was unable to find any DDK/WDK installed on your system.
查看>>
mysql索引创建和使用注意事项
查看>>
MySQL索引原理以及查询优化
查看>>
Mysql索引底层结构的分析
查看>>
MySQL索引底层:B+树详解
查看>>
Mysql索引总结
查看>>
MySQL索引背后的数据结构及算法原理
查看>>
mysql经常使用命令
查看>>
MySQL缓存使用率超过80%的解决方法
查看>>