pair对组的创建 #include<iostream> using namespace std; void test01() { // 对组的创建 pair<string, int> p1("张三", 10); cout << p1.first << " " << p1.second << endl; pair<string, int> p2 = make_pair("张三", 10); cout << p2.first << " " << p2.second << endl; }