STL 小白学习(9) 对组
void test01() {
//构造方法
pair<int, int> p1(, );
cout << p1.first << p1.second << endl;
pair<int, string> p2 = make_pair(, "assd");
cout << p2.first << p2.second << endl;
pair<int, string> p3 = p2;
}
STL 小白学习(9) 对组的更多相关文章
- STL 小白学习(1) 初步认识
#include <iostream> using namespace std; #include <vector> //动态数组 #include <algorithm ...
- STL 小白学习(10) map
map的构造函数 map<int, string> mapS; 数据的插入:用insert函数插入pair数据,下面举例说明 mapStudent.insert(pair<, &qu ...
- STL 小白学习(8) set 二叉树
#include <iostream> using namespace std; #include <set> void printSet(set<int> s) ...
- STL 小白学习(7) list
#include <iostream> using namespace std; #include <list> void printList(list<int>& ...
- STL 小白学习(5) stack栈
#include <iostream> #include <stack> //stack 不遍历 不支持随机访问 必须pop出去 才能进行访问 using namespace ...
- STL 小白学习(6) queue
//queue 一端插入 另一端删除 //不能遍历(不提供迭代器) 不支持随机访问 #include <queue> #include <iostream> using nam ...
- STL 小白学习(4) deque
#include <iostream> #include <deque> //deque容器 双口 using namespace std; void printDeque(d ...
- STL 小白学习(3) vector
#include <iostream> using namespace std; #include <vector> void printVector(vector<in ...
- STL 小白学习(2) string
#include <iostream> using namespace std; #include <string> //初始化操作 void test01() { //初始化 ...
随机推荐
- Global.asax
ASP.NET Global.asax 文件使用方法 - .net 标签: asp.net.netapplicationauthenticationsessionobjec ...
- PID算法(c 语言)(转)
PID算法(c 语言)(来自老外) #include <stdio.h> #include<math.h> //定义PID 的结构体 struct _pid { int pv; ...
- Html5 Page Creator,简易h5页面场景制作
- vue scrolle在tab 中使用
1. 使用npm 安装 npm i vue-scroller -S 地址: https://github.com/wangdahoo/vue-scroller2. 引入 main.js: import ...
- bzoj 4770 图样 - 概率与期望 - 动态规划
题目传送门 传送门I 传送门II 题目大意 有一个$n$个点的完全图,每个点的权值是$[0, 2^{m})$中的随机整数,两点间的边的权值是两点点权的异或和,问它的最小异或生成树的边权和的期望. 考虑 ...
- SPOJ 10570 LONGCS - Longest Common Substring
思路 和SPOJ 1812 LCS2 - Longest Common Substring II一个思路,改成多组数据就有三倍经验了 代码 #include <cstdio> #inclu ...
- 论文笔记:Siamese Cascaded Region Proposal Networks for Real-Time Visual Tracking
Siamese Cascaded Region Proposal Networks for Real-Time Visual Tracking 2019-03-20 16:45:23 Paper:ht ...
- js随机数的取整
- 读书笔记--《编写高质量代码:改善Python程序的91个建议》
第一章 引论 建议写Pythonic式的代码,我理解为充分利用pythonAPI,用最简洁方式写出代码 1.两个变量交换: a, b = b, a 2.翻转list: a = [1, 2, 3, ...
- Maven工程的POM继承
父POM的作用是消除配置的重复. 父POM必须<packaging>pom</packaging>. 还有 <modules> <module>子模块1 ...