<span style="font-size:18px;">/*
* Filename: code.cpp
* Created: 2016-04-30
* Author: yunlong Wang
*[mail:17744454343@163.com]
* Desciption: Desciption
*/
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <stack>
#include <queue>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <vector>
#include <bitset>
#include <list>
#include <sstream>
#include <set>
#include <functional>
using namespace std;
#define INT_MAX 1 << 30
#define MAX 100
typedef long long ll;
int n;
int main(int argc, char const* argv[])
{
pair <int,double>p1(1,2.2); //pair赋值的两种方法
pair <int,double>p2(p1);
pair <int,double>p3 = p1;
cout << p1.first << " " << p1.second << endl;
cout << p2.first << " " << p2.second << endl;
cout << p3.first << " " << p3.second << endl;
pair <int,int>p4 = make_pair(1,4); //pair初.始化的两种方法
pair <string,int>p5("live",1);
cout << p4.first << " " << p4.second << endl;
cout << p5.first << " " << p5.second << endl;
return 0;
}</span>
pair很轻巧,用起来很方便;
容我日后来更。。。